Regex first and last characters must be a number -
could please me come correct regex match string starts , ends digit. string between these 2 digits may have ,
, .
, digits only.
i have tried:
([0-9.,]+)
strings match:
,5,190 ,5,190,
output should 5,190
.
alright let's take definition bit bit:
string starting number.
[0-9]
or\d
same thing.string may have , , . , consist numbers.
`[\d,.]*
string ends number.
\d
which gives \d[\d,.]*\d
. try it, , please try understand before moving on.
Comments
Post a Comment