[英]Creating a Java regular expression that will match on numbers at beginning of the input only
[英]Java: Regular expression for the input field only numbers and commas + space characters
有一个字段填充数字或数字组。
逗号后必须是空格!
符号“ ,
”和空格不能是字段的开头和/
或结尾
^[\d+]{1,}([,]{1}[\s]{1}).*[\d+]$
- this does not work. please help to write a regular expression according to the described condition.
例
1 - ok!
2, 3 - ok!
6, 7, 4 -ok!
,5 - bad!
5 6 0 - bad!
4,5 - bad!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.