Matching a number and everything afterwards up until another number in Regex? -



Matching a number and everything afterwards up until another number in Regex? -

i've spent way many minutes on now, thought i'd seek luck here instead.

i need regex pattern matches whole number , everything afterwards until whole number appears. in next string:

50 !#!#€test30testtest 20!!!!`

it should match:

50 !#!#€test 30testtest 20!!!!

is there way that?

\d+\d+

does that.

\d+ matches 1 or more digits, , \d+ matches 1 or more non-digits.

if set each part in parentheses, can access matches separately: (\d+)(\d+).

regex

Comments

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -