An example analysis of Chinese regular matching method in Java

This paper describes the method of Java regular matching Chinese. Share with you for your reference, as follows:

1. Match between double quotation marks:

2. Chinese content also matches:

3. Punctuation also matches:

The outputs of the above three programs are as follows:

PS: here are two very convenient regular expression tools for your reference:

JavaScript regular expression online test tool: http://tools.jb51.net/regex/javascript

Regular expression online generation tool: http://tools.jb51.net/regex/create_reg

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
分享
二维码
< <上一篇
下一篇>>