In message <1163618469.283689.22710@m7g2000cwm.googlegroups.c om>, Wed,
15 Nov 2006 11:21:09, Tom <biegel@gmail.comwrites
Quote:
>[abc] - matches "a", "b", or "c"
>[^abc] - matches anything except "a", "b", and "c"
>(abc) - matches "abc", with back reference
>??? - matches anything except "abc" literally?? What is the syntax for
>this expression?
>
>If this kind of non-matching grouping expression doesn't exist, what's
>an alternate way to have the regexp engine (perl in my case), match
>"anything but 'abc'"?
I am using a standards-compliant newsreader. Your posting agent does
horrible things to your layout, as shown when viewing your article in my
reader; however, in reply mode I get the material quoted as presumably
intended. Please change your /modus operandi/ appropriately.
[abc] matches any character in the set "abc".
[^abc] matches any character not in the set "abc".
One approach to your problem, which should work even in older
RegExp-capable browsers, would be to use .replace(/abc/g, "\u0416"),
where \u0416 is a character which is known not to appear in the original
string, and you can then use [^\u0416] to be not matched.
It's a good idea to read the newsgroup and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.