Linux Regular Expressions
Character match:
.: Match any single character
[]: Matches any single character in the specified range;
[^]: Match any single character out of the specified range [: digit:] lower upper alpha alnum space
Matching times: used after the characters whose occurrences are to be specified and used to limit the occurrences of the previous characters
*: Match the first character any time: 0, 1. Multiple times
. *: Match any character of any length
\? : Match the first character 0 or once, and the first character is optional
\ +: Match the first character once or multiple times, at least once,
\ {M \} matches the previous character m times
\ {M. n \} matches the character above it at least m times, n times
\ {0, n \}: n times
\ {M, \}: At least m times
Positioning:
^: The beginning of the line is anchored to the left of the mode.
$: Anchor at the end of the line: used at the rightmost of the Mode
^ PATTERN: used for PATTERN
^ $: Blank line
^ [[: Space:]: empty line or blank line
Word: a continuous character (string) consisting of non-special characters is a word.
\ <Or \ B: the beginning of the word, used on the left side of the word mode
\> Or \ B: The end of the word, used to the right of the Word Pattern
\ <PATTERN \>: match the complete word
The above is a basic Regular Expression in Linux introduced by xiaobian. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!