in reply to Regexp problem
perl -e 'if ("26-04"=~/\d{2}[\-._]\d{2}([\-._]\d{2})*/) { print "yes\n +" }' #prints yes
Seems to work. No need to escape the '-' as it would not be used as range character when it is the first character in a character class
PS: Use <c>-tags around your regex so that it gets displayed correctly in the browser
|
|---|