Ask a regular expression for writing: 1, 33, 44,112, 2. it does not seem easy to write! Thank you !!! At last, this post was edited by vencie from 2013-02-2221:0. ask for a regular expression: & nbsp; 44,112, 2, that is, the numbers separated by commas. there are two requirements for a regular expression: 1, 33, 44,112, 2. it does not seem easy to write! Thank you !!!
This post was last edited by vencie at 21:02:30
Ask for a regular expression: 1, 33, 44,112, 2
That is, the numbers separated by commas.
There are two requirements:
1. the beginning and end cannot contain commas
2. the comma in the middle cannot appear twice in a row.
I tried this method, but it is not feasible:
^ [0-9] * {[,]? [0-9] *} * $"
Help!
Regular expression
------ Solution --------------------
/^ (\ D +,) {1,} \ d + $/
------ Solution --------------------
Write in this way
/^ (? : \ D +,) * \ d + $/