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

     Thank you. I understand better now. I had to look up the "?:" and "?!". I'm going to play with it a little.
     I've also thought of something like /^PH.+[^HI]F?\-000/
     Some examples of the file names are

PH0024080209401400001PH-000 PH0026072913114200001IF-000 PH0029072911352700001AF-000
     I wonder why it worked on 5.6.1? I'll have to double-check that.

Invulnerable. Unlimited XP. Unlimited Votes. I must be...
        GhodMode

Replies are listed 'Best First'.
Re: old Perl regex problem
by Abigail-II (Bishop) on Aug 02, 2002 at 15:04 UTC
    /^PH.+[^HI]F?\-000/ will accept a file called PHfooIF-000/. After all, the .+ can match the 'fooI', the [^HF] can match the 'I', and the F? matches nothing.

    Abigail