Yes ....and No. I tested (briefly) just looking for "x" and it seemed to work OK for Ext, Ex, or X because the code then starts looking for a sequence of numbers following the occurrence of "x". If it finds a number, then it extracts every following number until it finds a non-numeric character. Then it stops.
Anyway, I will look at the code and change the logic to extract an extension when it finds ANY single text character (A-Z). THis would assume that any character, a-z, that occurs will be followed by an extension. It would not be triggered by parens () or dashes or slashes, etc: only a-z.
It would be helpful to know what cases we are dealing with.
QUESTION: Do you have the case of Ext 111 (972) 555-5555? That is, the extension occurs before the number.
OR, is it the rule that entensions may, or may not, be present, and if present, the extension will occur after the main number?
In other words to write an extraction routine we have to know the patterns we are dealing with.