in reply to problem in regular expression

It's easier than that... You should read perlrequick, perlretut, and perlre. ...it's a couple hours of reading, but as they say, "then you'll know."

Here's an example of how easy it can be to detect ascii values above 126, using a regular expression:

while( $string =~ m/([^\x01-\x7E]+)/g ) { print $1, "\n"; }

Dave

Replies are listed 'Best First'.
Re^2: problem in regular expression
by CountZero (Bishop) on Sep 03, 2005 at 07:51 UTC
    I would drop the + otherwise you will get into one group any multiple of characters above ASCII 126.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law