Hello everyone,
I’m using a regex to capture strings from a .txt file that have the first three values as letters and the rest as numbers:
System.Text.RegularExpressions.Regex.Match(myString, “[A-Z]{3}[0-9]{3}”).Value
However, the .txt file from where I get these strings also has a pattern of 2 letters + numbers (example: BY4851) and 2 letters + numbers + letter at the end (example: BT47841X)
I would like to add an OR condition to the regex I already use, to add these two more conditions. Something like:
System.Text.RegularExpressions.Regex.Match (myString, “[AZ]{3}[0-9]{3}” || “[AZ]{2}[0-9]{4}” || "[ AZ]{2}[0-9]{5}[AZ]{1} ").Value
Somebody help me please