Monday, 15 September 2014

REGEX specification for .NET to capture text with double carets -



REGEX specification for .NET to capture text with double carets -

i wondering if can help this. trying come appropriate regex capture next strings (conditional look ternary operators) within market research (e.g., confirmit) xml file excluded language translation.

strings captured - examples:

^f('field1').get()^ ^punchlastqanswered(currentform())^

regex:

\^f[\w\w]*\^ \^[a-za-z]{1}\(*\)\^

the problem when there 2 such strings on same line, both beingness captured including word "and" in between.

^f('field1').get()^ , ^f('field2').get()^

how alter regex each individual string only? there way specific string boundary? tired "/b" did not work.

seems want this,

\^.+?\^(?=\s|$)

demo

regex

No comments:

Post a Comment