in reply to help with []'s in regex please

... since the [eE] means find zero or more e's or E's right?

No, it means one upper- or lower-case 'e'. Brackets mean a character class. You can make it accept zero with a question mark.

The simpler way to write that is with the /i modifier for a case-insensitive match:     return if ! /\.jpe?g$/i; I've made the 'e' optional in the match.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: help with []'s in regex please
by CountZero (Bishop) on Aug 27, 2005 at 20:50 UTC
    But that wouldn't find .jpeg

    CountZero

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

      Golly, you're quick! It didn't take me a minute from posting to fix that ;-)

      After Compline,
      Zaxo

        A cable network and lots of luck ...

        CountZero

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