Negating a set of words via java regex!

Posted by jadaaih on Stack Overflow See other posts from Stack Overflow or by jadaaih
Published on 2009-08-26T09:48:50Z Indexed on 2010/04/22 12:43 UTC
Read the original article Hit count: 971

Filed under:
|
|

Hi folks,

I would like to negate a set of words using java regex.

Say, I want to negate cvs, svn, nvs, mvc. I wrote a regex which is ^[(svn|cvs|nvs|mvc)].

Some how that seems not to be working. Could you please help? Thanks.

.\J

© Stack Overflow or respective owner

Related posts about regex

Related posts about java