They both have their uses, but for beginners to regex, posix is MUCH more simple than perl, and much less error pront.
True to some extent. I did find that posix was easier to learn and understand special character classes, but when my regex's got to be too long, i decided to suck it up and learn PCRE 😉 I can't imagine going back now, but it's all what you're comfortable with.
What is the PERL equivalent for what I posted?
$regex = ereg ("[0-9].[0-9].[0-9]", $doh, $args);
did you mean:
$regex = ereg ("[0-9].[0-9].[0-9]", $doh, $args);
escaping the special '.' char that matches 'any' character
i would have written it
$regex = ereg ("[[:digit:]].[[:digit:]].[[:digit:]]", $doh, $args);
but that's just me.
for PCRE
$regex = preg_match('/\d.\d.\d/', $doh, $args)
sorry for the long-winded response 🙂
p.