Detailed explanation of split () method example of Java regular expression
•
Java
This article illustrates the split () method of Java regular expressions. Share with you for your reference, as follows:
1. Method introduction
(1) Public string [] split (string regex) splits the string according to the matching of the given regular expression
(2) Public string [] split (string regex, int limit) splits the string based on matching the given regular expression
2. Method example
3. Example results
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
二维码