开发者

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}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜