What Regular Expression do I need to match "3213.32.2311" and similar?
I want a regular expression to match input like:
3213.32.2311
开发者_JAVA技巧
Format required is:
- Four numeric characters
- a
.
- 2 numeric characters
- a
.
- 4 numeric characters.
Get yourself a regex cheatsheet such as http://www.regular-expressions.info/reference.html
^\d{4}\.\d{2}\.\d{4}$
Try: \d{4}\.\d{2}\.\d{4}
\d{4}\.\d{2}\.\d{4}
精彩评论