[英]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.