01-26-2009 7:50 PM
I want to find the "sbeed" from a string. I have written the following regex for that.
But I am in confusion which is better regex?
regex = '(?!sbeed$).*$'.
regex = '^$|^[^s].*|^s$|^s[^b].*|^sb$|^sb[^e].*|^sbe$|^sbe[^e].*|^sbee$|^sbee[^d].*|^sbeed.+'.
a®s
Edited by: a®s on Jan 26, 2009 4:36 PM
01-29-2009 7:16 PM
As the following RegEx processes little bit faster than the other while doing with large strings
regex = '(?!sbeed$).*$'.
a®