How can I write a RegEx expression match the number begin with 890 or 1234 and its whole lengh is 10 if 890 or 11 if 1234
For example:
the input string : abc89093567892bcd
the result is :8909356789
the input string : abc123498912335bcd
the result is :12349891233
How can I write a RegEx expression match the number begin with 890 or
Share
Using perl or sed, you could try something like:
\d is for digit, and {3,11} means that a digit must appear between 3 and 11 times.