I am new to regex learning and I am trying to achieve the below. I will be really thankful to anyone who can help me in my learning
What I'm trying to achieve Number (or) Number and Comma (or) Number Comma and Space (or) Number Comma Space Number
My Regex: (^\d$)|(^\d,+$)|(^\d\s+$)|(^\d,\s)+$|(^\d,+\d)$
Complete Test Data URL : https://regexr.com/5eogj
Pass Data
- 11
- 11,11
- 1, 111,11
- 111,,,
- 11, [whitespace]
- 1 , 1
Fail/Invalid Data
- ABC
- Any Special Characters other than comma and space
- 111 1111