in reply to old Perl regex problem
First, I don't think the regular expression you have works at all. BrowserUk's version works nicely.
I don't remember if look-behind was supported in 5.004. If so, you might use something like: /^PH.*(?<![HI]-000)$/
One question: is a file named "PH-000" ok, or not? From your description, I'd think it was but the solutions so far (including the one above) don't allow it. This would: /^PH(.*)/ and $1 !~ /[HI]-000$/;
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: old Perl regex problem
by GhodMode (Pilgrim) on Aug 02, 2002 at 14:01 UTC | |
by Abigail-II (Bishop) on Aug 02, 2002 at 14:20 UTC |