I have a text file having numbers like this +12345678912 (start with + and is 11 digit long) separated by tab whitespaces (seems like) in a text among with other data.
How can I match only those who have a + before the text and match the first 11 characters if they’re present and they’re all digits?
Updated:
This is the input
+12345678912 http://google.com 2012-05-07 11:30:06
+12345678913 http://google.com 2012-05-07 19:26:21
And the output should be an array with matching results
[12345678912, 12345678913]
Use this…
CodePad.