Pick the exact digit match from a string

Viewed 80

I have the input strings as below

1) ISBN_9781338034424_001_S_r1.mp3

2) 001_Ch001_987373737.mp3

3) This Is test 001 Chap01.mp3

4) Anger_Cha01_001.mp3

and I am using below regex to pick "001" into TrackNumber group

(?:(?<TrackNumber>\d{3})|(?<Revision>r\d{1}))(?![a-zA-Z])

However the above also picking up the "978", "133", "803" and etc into TrackNumber group (example 1 and 2) .

How do I change the above regex to pick only the "001" into TrackNumber?

-Alan-

1 Answers
Related