Z
Zarkan
Hi all,
I've got a question for you, Regular Expression Masters
I'm not very experienced in that, but I've made many attempts and I
couldn't get the right regExp yet..
Basically, I need a regular expression able to find a certain string
(say, "abc") which is NOT followed by an HTML tag (that is, which is
not followed by "<").
I've tried with this:
/abc[^<]/
...But this actually does something different:
it finds "abc" when *followed by a character* which is different from
"<".
But I want to find the string when it's followed:
a) either by NOTHING
b) or by a character different from "<"
Then, I tried this (in order to find "abc" + no character, OR 1
character different from "<"):
/abc[^<]{0,1}/
...But this expression doesn't work either (that is, it matches the
string also when it's followed by "<")!
I've tried many other ways, but with no success!!
How shall I do??
Many thanks,
Zark
I've got a question for you, Regular Expression Masters
I'm not very experienced in that, but I've made many attempts and I
couldn't get the right regExp yet..
Basically, I need a regular expression able to find a certain string
(say, "abc") which is NOT followed by an HTML tag (that is, which is
not followed by "<").
I've tried with this:
/abc[^<]/
...But this actually does something different:
it finds "abc" when *followed by a character* which is different from
"<".
But I want to find the string when it's followed:
a) either by NOTHING
b) or by a character different from "<"
Then, I tried this (in order to find "abc" + no character, OR 1
character different from "<"):
/abc[^<]{0,1}/
...But this expression doesn't work either (that is, it matches the
string also when it's followed by "<")!
I've tried many other ways, but with no success!!
How shall I do??
Many thanks,
Zark