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 | |
by Zaxo (Archbishop) on Aug 27, 2005 at 21:01 UTC | |
by CountZero (Bishop) on Aug 27, 2005 at 21:04 UTC |