There are only three matching patterns of regular expressions in JS. of has no detailed explanation of single line patterns
- 2021-07-06 10:08:00
- OfStack
There are only three JS regular expression object patterns:
g (Full Text Find All pattern Occurred)
i (Case Ignore)
m (Multiline Lookup)
That is, there is no single-line match pattern, Singleline (single-line pattern): Change the meaning of. to match every 1 character (including the newline\ n).
As in java String regex = "(? s) (? < = interface). {0,500} (shutdown) "; ----"." is indicated in line 1.
But you can use [\ d\ D] or [\ w\ W] or [\ s\ S] or (.\ s) *? To solve the problem of unable to wrap lines