You are here:  » help needed with regular expression


help needed with regular expression

Submitted by tobyhage on Sun, 2017-06-25 21:25 in

David,

Sorry to ask this, but i'am terrible with regular expressions.
I tried a normal search and replace and this is also not working.

I have a feed where they use this kind of codes in the description field:

<lt/>br /<gt/><lt/>br /<gt/><lt/>b<gt/>

and i want this to be replaced with the html codes

<br /><br /><b>

i already have the correct filters, but don't know how to use them:

i had a normal search replace with:

search: &lt;lt/&gt;
replace: <

and another one with this:

search: &lt;gt/&gt;
replace: >

but this is not working. Hopefully you can help me with this....

Submitted by support on Mon, 2017-06-26 07:21

Hello Toby,

There is code for an HTML Entity Decode filter in this comment which is probably the easiest solution...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by tobyhage on Mon, 2017-06-26 21:41

David,

The HTML Entity Decode filter was not working. I have found the solution:

I configured two search and replace filters with following values:

search: &lt;lt/&gt;
replace: &lt;

and

search: &lt;gt/&gt;
replace: &gt;