vbscript Regex question here...
I have a string that will/should contain either a 5 digit number "12345" or a record number that will be something like "ABC_E00012345", separated by whitespace character
I would like to match each individual instance of the 2 possibilities above.
Example String: 12345 ABC_E12345 54321 98765 ABC_E98765 00 123 A
What I would like to match:
12345
ABC_E12345
54321
98765
ABC_E98765
What I would like to discard, or just not return:
00
123
A
The pattern I came up with is returning such things as 00 123 A, can anyone help?
objRegEx.Pattern = "[^\d{5}$]|^ABC_E000[\d{5}$]"
Also, if possible can someone give me the in a nutshell of when and where to use ^ or $ inside or outside bracket/paren
Thanks everyone!