in reply to Re: old Perl regex problem
in thread old Perl regex problem

Close, but that still matches PH-000 due to the .{0,4} clause. I think that
/^PH(?:.{0,3}|.*(?![HI]-000).{5})$/
does it.
-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: old Perl regex problem
by Abigail-II (Bishop) on Aug 05, 2002 at 10:01 UTC
    but that still matches PH-000
    That's because I wrote the regex before he revealed that the things could overlap. However, later he suggests that the file names are all pretty long, so PH-000 can't happen anyway.

    Abigail