simple documentation of regular expressions commonly used during development: 1.[a-b] is a number or letter from a- b 2.a.b represents ending with a beginning to B. Only one character can be represented. For example, Acb,adb,aab,a#b,a B and other 3.a[abcde]b only the words specified in the square brackets characters participate in matching, can only match a single character 4. If you want to get aoob, you need to use |. | The basic meaning of an operator is a "or" operation. to match "Toon", use the "t (A|e|i|o|oo) n" Regular expression. You cannot use a square extension, because the square brackets allow only a single character to be matched, and the parentheses "()" must be used here. Parentheses can also be used to group 5. If you want to express starting with a string, you need to add (. *) after the given string. For example, the string that needs to be matched is: "sp0\\d\\* (. *)", which means matching any string that begins with the sp04 (which can be any number of 0-9) *.
Common methods in the development of Android regular expression