in reply to Regex help

The first reply above answers the mystery for you, but on a side note, you should consider whether it would be better/easier if the regex specifies just the acceptable characters -- something like:
my $decision = ( $input =~ /[^\s\w.,:;'"/?!~`-]/ ) ? "not okay" : "oka +y"; print $decision;
I'm assuming those are the "legal" characters because those are the things that we "normally" expect in sentences and that weren't in the OP regex (and because you didn't say anything about dealing with stuff outside the ascii range of 0-127).

In this sort of exercise, saying exactly what's legal is often better than trying to list everything that's illegal, because you might find that your data contains "illegal" things that you forgot to include (or didn't know you had to, like unexpected control characters or things outside the ascii range).

Replies are listed 'Best First'.
Re^2: Regex help
by Anonymous Monk on Jul 26, 2009 at 06:49 UTC

    Thanks graff!

    I've replaced my regex with yours - it makes so much sense :)

    And thanks to everyone for commenting!</P