Regex to match all of a set except certain ones

Posted by Davy8 on Stack Overflow See other posts from Stack Overflow or by Davy8
Published on 2010-03-28T05:33:25Z Indexed on 2010/03/28 5:43 UTC
Read the original article Hit count: 294

Filed under:

I'm sure this has been asked before, but I can't seem to find it (or know the proper wording to search for)

Basically I want a regex that matches all non-alphanumeric except hyphens. So basically match \W+ except exclude '-' I'm not sure how to exclude specific ones from a premade set.

© Stack Overflow or respective owner

Related posts about regex