Regex help

color><param>00000,0000,DDEE/param>TThanks for your replies guys.You're right in that it DOES work correctly using 4D code in a WHILEloop.I wanted to use prey_replace to do all the replacements in one shot.

I was using the Preg Replace function in Regex Plugin and this does NOTwork!

fr2_alltext:="Here is some example text <tColAttrWidth:example one>andanother one <tColAttrWidth:example two> end of text."fr2_alltext:=Preg Replace ("<tColAttrWidth:.+>"";"";fr2_alltext)

I also tried executing the preg_replace function in 4D:

fr2_alltext:="Here is some example text <tColAttrWidth:example one>andanother one <tColAttrWidth:example two>eend of text"$pattern:="<tColAttrWidth:.*?>""$result:=""$phpok:=PHP Execute("";"preg_replace";$result;$pattern;fr2_alltext)

But that doesn't work either ... $phpok=false and $result is "null"/color>what plugin?

I wouldn't use php for that.

You can find elaborate functions based on the 4D "Find regex" functionin 2 4D free components:<http://forums.4d.fr/Post/FR/13445041/1/13445042#13445042><http://forums.4d.fr/Post/FR/7161740/1/7161741#7161741>

--Arnaud de MontardMilan Adamov (3/31/14 10:50 AM)

On 31.03.2014., at 09.10, Pat Bensky <pbensky@... wrote:

color><param>00000,0000,DDEE/param>TThanks for your replies guys.You're right in that it DOES work correctly using 4D code in a WHILEloop.I wanted to use prey_replace to do all the replacements in one shot.

I was using the Preg Replace function in Regex Plugin and this does NOTwork!

/color>HHi Pat,

I can't recommend enough great piece of software from Mac technologiesConsulting:

http://www.mactechnologies.com/index.php?page=downloads#regexrx

Yes, it is one "regex helper" app more, but his one knows about 4D.While preparing my Markdown session for last Summit this tool helpedme a lot, the option to copy regex code into pasteboard and paste itin 4D method is worth $5 they ask for it: