Any number of any characters in notepad++
You must specify the following line
"='root' && ... ="
Where ... - any number of any characters
How do I set any number of any characters in a regular expression? I saw
Requests given in the response
(?s)"='root' && .*? ="
"='root' && (?s:.*?) ="
Don't help
Please do not minusovat for the fact that I do not write in the comments (and give a link to the document to insert a comment with with a picture)
There should be no spaces between the character =
and the word root
- in this case, there should be no directives between root
and the character =
, and if there are, please
explain the meaning of the following code sections
-
\s*
(there are doubts about the need to use this directive beforeroot
, if there is a space, then why not use\s+
) -
\s+
(As I understood\s+
means a space, but what\s*
did not understand.)
Understanding using \s*
prevents the next command
if ...== 'root' && ...==
I also forgot how to use apostrophes in a search expression query - do I need to frame apostrophes in a special way?
Sorry that I'm asking you and not Google - just in many places it is not clear written.
2 answers
Check the box and new lines:
You can also use the (?s)
flag or a group with the (?s:...)
modifier:
(?s)"=root && .*? ="
"=root && (?s:.*?) ="