PDA

View Full Version : Reg Expression Q: How to revere match literal string?


lierduh
07-23-2005, 12:16 PM
I want to search for line breaks, but excluding certain ones. eg.

I want to search for

"abc\r\nABC" or "<abc>\r\n<ABC>"...

...but I do not want to include

"<ul>\r\n<li>" or "</li>\r\n<li>"

So what I need is to reverse match strings. A '^' in a character class only negates a single character, not a string. Any idea for me how to achieve this? Thanks. I could have some mental block if this turns out to be something very simple.:)

Dean C
07-23-2005, 12:30 PM
Negate a match with (^string)

lierduh
07-23-2005, 12:46 PM
Negate a match with (^string)

Would that translate into the Beginning of the string? ie. matches "string", but not "a string".

lierduh
07-26-2005, 07:18 AM
Just want to report back.

What I wanted to do can be done using "lookforward" and "lookback".