Regex help
Arnaud de Montard (3/31/14 10:28AM)
Milan Adamov (3/31/14 10:50AM)
Arnaud de Montard (3/31/14 10:28 AM)
Le 31 mars 2014 ý 09:10, Pat Bensky a Ècrit :
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 WHILE
loop.
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 NOT
work!
fr2_alltext:="Here is some example text <tColAttrWidth:example one>
and
another 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>
and
another 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" function
in 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 Montard
Milan 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 WHILE
loop.
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 NOT
work!
/color>HHi Pat,
I can't recommend enough great piece of software from Mac technologies
Consulting:
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 helped
me a lot, the option to copy regex code into pasteboard and paste it
in 4D method is worth $5 they ask for it:
https://itunes.apple.com/hr/app/regexrx/id498370702?mt=12
Regards,
Milan
Reply to this message
Summary created 3/31/14 at 10:37AM by Intellex Corporation
Comments welcome at: feedback@intellexcorp.com