I’ve got phone number data streaming as strings and sometimes I get junk like ZF420 or 44CE8402, which need to be excluded. The phone numbers are expressed as such — 447711223344 etc. So, the regex I have developed thus far is:
[^0-9][^ ]\d{3}+[(\D)+(^ )]
However, the above works to match the likes of ZF420, CC110, etc. but not 44CE8402. How should the regex be written to also match the latter (so I can throw them out)?
How about this?
It just matches a string of length 12 which are all digits.
But if this is the case and it’s just literally a string with only digits you want you would be better off checking to see if you could parse into a numeric data type successfully or not.