Method of checking QQ number by Java regular expression

Java regular expression

Regular expressions define the pattern of strings. Regular expressions can be used to search, edit, or process text. Regular expressions are not limited to one language, but there are subtle differences in each language.

Regular expression instance

A string is actually a simple regular expression. For example, the Hello world regular expression matches the "Hello world" string.

. (DOT) is also a regular expression that matches any character, such as "a" or "1".

The following table lists some examples and descriptions of regular expressions:

/** the verification QQ number * must be 5-15 digits * 0 cannot start * must be all numbers*/

(1) Use regular expressions to check QQ numbers

(2) Mode 2

summary

The above is the method of checking QQ number with Java regular expression introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>