The Wayback Machine - https://web.archive.org/web/20230416101532/https://www.experts-exchange.com/questions/28409613/regex-pattern-to-delete-a-pattern-i-need-for-forward-backslash-and-reverse-backslash.html
Static oRE As Object' If oRE Is Nothing Then Set oRE = CreateObject("vbscript.regexp") oRE.Global = True End If oRE.Pattern = "(?:([A-Z]+[0-9]*)\s*-\s*(?:([A-Z0-9]*)\s*-\s*)?(?:([A-Z0-9]*)\s*-\s*)?(?:([A-Z0-9]*)\s*-\s*)?)|([0-9]+)\s*-\s*([A-Z]+[0-9]*)(?:\s*-\s*([A-Z0-9]*))?(?:\s*-\s*([A-Z0-9]*))?" cD = oRE.Replace(cD, "$1$2$3$4$5$6$7$8")
I do not want it to delete patterns like fraction:
1/2 or 3-1/2 or 3 1/2 or 16/32
I need this regex to work for the following patterns BUT NOT in the same regex call
before:
LU250/40/H/ECO
LU310/H/ECO
CMH39/MR16/UL93\SP
CMH39/MR16/UL93/FL
CMH39/MR16/UL93WFL
F28T8/XL\SPX35\ECO
CMHi\23P38/FL/ECO
If oRE Is Nothing Then
Set oRE = CreateObject("vbscript.regexp")
oRE.Global = True
End If
oRE.Pattern = "([A-Z]\w*)[/\\](\w*)[/\\](\w*)[/\\]?(\w*)[/\\]?(\w*)[/\\]?"
1/2-20
1/4-20
1/4-2
1/3-35
1/8-10
Please confirm.