Regular expression: . * ? Their respective meanings

(.*?) Interpretation of a single character.

.Any      character except \n (newline character)

*      Match 0-infinite times

    Non-greedy mode (return directly once the data is obtained, no more downward matching)

(): Content to be extracted
.: Match any single string
*: Match (the symbol before *) 0 or more times
+: Match (the symbol before +) 1 or more times
?: Don't be too greedy, after finding Stop after first match.
.*: Matches 0/multiple consecutive characters
.+: ​​Matches 1/multiple consecutive characters
\: Escape, \. means matching characters. Itself
 

Guess you like

Origin blog.csdn.net/weixin_45467975/article/details/131680431