Hi I have a regular expression that I’m working on and am trying to figure out why it won’t match.
Some sample matches should be:
sxbad0ap_ach_refund_inp_0x253_041012.txt
sxbad0ap_ach_refund_inp_a7255_042512.txt
The regex:
^sxbad0ap_ach_refund_inp_[a-z0-9]{5}_[0-9]{6}\.txt$
Link to Regex test:
http://regexr.com?313ni
It is a testing issue: if you put each string by itself, your regexp matches them flawlessly. Since you put both items in the tester’s box, and your regex has
^and$requiring the entire string to match, two strings together do not match.