Page 2 of 2

Re: Regex help?

Posted: Fri Mar 07, 2014 10:12 am
by trenatos
Btw, that regex works without the field!

repeat while matchChunk( T, "(?msi)(\$(\w+=\"\w+\");)", p1start,p1End,p2Start,p2End)

Works just fine!

(I don't understand that regex, but that just means I'll spend time figuring out how it works :)

Re: Regex help?

Posted: Fri Mar 07, 2014 10:14 am
by trenatos
Thierry, I owe you a beer, thank you very much for the help with this issue :)

Re: Regex help?

Posted: Fri Mar 07, 2014 10:25 am
by Thierry
trenatos wrote:Btw, that regex works without the field!
yes, by chance :)
Backslashing quotes in a string often breaks LC parser :(
trenatos wrote: (?msi)(\$(\w+=\"\w+\");)", p1start,p1End,p2Start,p2End)
I don't understand that regex
(?msi) -> commands to say that is case insentive,
multi-line text entry and that the dot can match a return

\$ -> well, you know
\w+ -> match any word; the + is better than the *, because we are sure that we have at least one char
and if you are not at ease with regex, better avoid the "*"

the outlet () will feed p1start,p1End
the inlet () will feed p2Start,p2End

Regards and thanks for the beer.

Thierry