Character Type
Reference: http://www.gnu.org/software/emacs/manual/html_node/elisp/Char-Classes.html#Char-Classes
When using the character category, you need to add the upper brackets, such as the string: ABCD 3 AB \ ef
To match the numbers, use the character category.: [: Digit:]
The regular expression is written as follows: "[[: digit:]"
[: Xdigit:] used to match hexadecimal numbers
Forward-sentence command
Run the command: Forward-sentence to find the last position (end of the sentence) of the current sentence. Generally, the sentence is a full stop. question mark? Exclamation point! End. However, these symbols may appear in sentences.
For example, if the following sentence uses the forward-sentence command, you can still find the correct end of the sentence.
Hello, world dr. Mark make.
Emacs also provides the m-e shortcut.
Logic or
| The symbol must also use the \ prefix, so it is written as \ |
For example, the string is ABCD 3 AB \ EF.
The following regular expression can be used to match three sub-strings: AB cd AB.
"AB \ | cd"
The reason \ is restricted by the Emacs string syntax. The previous article has already been introduced.
Matching Group
() The matching group is represented by parentheses, but (and) is a special character. Use \ to indicate that it is not used as a special character. However, "\" is a special character and must be preceded by "\". Do not use it as a special character. Therefore
Is written as: \ (and \\)
For example, the regular "\ (AB \ | cd \)" matches the logic or string above and finds the first substring "ABCD"
For more advanced application Reference documents:
Http://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Backslash.html#Regexp-Backslash