RegEx: question mark
Posted: Tue May 30, 2006 7:33 am
With this simplest RegEx-filter
I'd like to catch images called ad1.gif or ad4.png. This works but I wonder why it doesn't match when the filename doesn't contain the number: ad.gif slips through.
Why that? I thought the question mark means "one or zero"?
Code: Select all
/\/ad?[0-9]\.(gif|jpg|png)/
Why that? I thought the question mark means "one or zero"?