I would like to match the following list of files with a single PCRE regex pattern
27919506_7368.jpg
27965477_68.jpg
52345652_1-4.jpg
65849674_245.jpg
54839756_34-9.jpg
What I've come up to so far is this \d{8}_\d{1,4}\.jpg
, however, this fails to match the -\d+
variations...
Likewise, this \d{8}_\d{1,4}-\d+\.jpg
fails to match the non -\d+
variations...
What would the correct pattern be that would match all of the above?