07-19-2012 4:56 PM
Hello, everyone!
I need a regular expression that matches every text that is not part of the XML tag. I found the regex below, which works perfectly in any online regex validator, but when i test it in DEMO_REGEX_TOY an error occurs.
(?<=^|>)[^><]+?(?=<|$)
Everything indicates that the problem is in ' <= '. There is another way to make it work?
i'll appreciate if someone help me.
[]'s
Vinicius
07-19-2012 5:01 PM
Try using
: REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>'
I tried this on regex toy and it work for me.
07-19-2012 5:01 PM
Try using
: REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>'
I tried this on regex toy and it work for me.
07-19-2012 5:56 PM
much more simple than search for the content between the tags! thank you 😉
07-19-2012 6:07 PM
Simplifying your answer:
REPLACE ALL OCCURRENCES OF REGEX '<[^<]+>' WITH space
07-19-2012 8:29 PM
Another option that's more greedy.
REPLACE ALL OCCURRENCES OF REGEX '\<(.*?)\>' WITH space