On Thu, May 5, 2011 at 7:55 AM, Rob Coops <rco...@gmail.com> wrote: > /\/|%|\$|\#\#|\s/g >
Why not just a character class? It's usually a bad idea to use alternation in these cases. m!^[/%#\s\$]+$! should do the trick. Or if there must be three #'s in a row, perhaps m!^ (?: [/%\s\$]+ | \#{3} )+ $!x ? In any case, you should consider if this is the right approach - There are hundreds of characters you probably don't want ( (?{ `echo "Hope you didn't use re 'eval';"` }) ), so the chance of going back and changing your program is high; It's an uphill, never-ending battle. Meanwhile, there only a handful of character that you actually want - Mayhaps /^\p{L}+$/ will do the trick? Brian.