Regular: meet certain regular expression -
Features: The symbols used to express a number of specific operations.
Action: String for special operations.
Benefits: simplify complex operations on strings.
Example:
main()//main方法
aaa (); aaa modulation method
public static void aaa () {// aaa method
string qq = "123456"; // attach a value to qq
string legex = "[1-9] [0-9] {4,14}"; // [1-9] The first one is only 1-9 [0-9] is only the second digital { 4,14} repeated 4-14 times a second.
boolean rx=qq.matches(regex);
if(rx)
sysout ( "right"); // shorthand
else
sysout ( "error");
}