Regular expressions: Regular expressions are a set of rules and methods that are defined for processing a large number of strings.
Regular expressions are widely used in almost all languages (e.g. Java, C, C + +, PHP, Python, etc.)
==================== Basic Regular =====================
^ Match with what to start with, ^w matches content starting with W
$ match with what ends, $w matches content ending with W
^$ Matching Blank lines
. Represents and can only represent any one character
\ escape character, such as \. Represents only.
* Repeat 0 or more of the preceding characters
. * Match All characters
Regular ==================== of ===================== strengthening
[ABC] matches any character in a character set
[^ABC] matches the content of any character that does not contain ^, the ^ in parentheses is the inverse
---------------need to use Egrep or sed-r if you do not use these two command brackets need to be escaped-----------
A{N,M} match repeats N to M times
A{n,} match repeats at least n times
A{n} match repeats n times
A{,M} match repeats up to M times
===================== Extended Regular =====================
+ denotes repeating "one or more" preceding characters
? Represents repeating "0 or one" preceding characters
| means filtering multiple strings at the same time
() group filtering, referencing backward
Linux Regular Expressions (awk, sed, grep)