There are only three types of JS regular expression object patterns:
g (Full text to find all patterns that appear)
i (Ignore case)
m (multiple line search)
That is, there is no single line matching pattern. Singleline (single line mode): Change the meaning of . to make it match each character (including newline/n).
For example, in Java, String regex = "(?s)(?<=interface).{0,500}(shutdown)";------------"." means it is on a line.
But you can use [/d/D] or [/w/W] or [/s/S] or (.|/s)*? to solve the problem of not being able to wrap the line
The above article has only 3 matching patterns (no single-line pattern) and detailed explanation of regular expressions in JS is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.