I'm trying to get the op numbers from the following filename strings using RexEx which the pattern will be used in VS2017 using the C# language for developing a Windows Form Application. In this application, we are filtering filenames in a datagridview by Op number when searching through a folder directory and all its subdirectories. I'm having an issue trying to get the regex to work on the tester websites I have tried. These are regxr.com and regexstorm.net/tester
Filename1: C-2590-3 REV-B OP#50.pcl
Filename 2: C-2590-3 REV-B OP#50-59.pcl
Filename 3: C-2590-3 REV-B OP#50-59-90.pcl
Filename 4: C-2590-3 REV-B OP#50-59-90-70(Flip).pcl
Filename 5: C-2590-3 REV-B OP#50-59-90 (Flip)60-90.pcl
The text I need to capture is :
Filename 1 Results: 50
Filename 2 Results: 50-59
Filename 3 Results: 50-59-90
Filename 4 Results: 50-59-90-70
Filename 5 Results: 50-59-90 60-90
This is what I have tried on the regexr.com tester:
and I keep getting stuck because it will only show me the 1st two digits "50"
I'm not real familiar with Regex and I thought I should get some help because I'm missing something And don't know what that might be.
Can anyone help with this? Here is a screenshot of the form application running.