Reputation: 865
I've been hacked on some of my websites with code injection. I'm trying to find a line that contain part of the code injection with notepad++. Unfortunatly my regex does not work on notepad++: I'm trying to work with this :
/^ *(.*(?:\$qV\=\"stop\").*) *$/igm
Notepad++ throw invalid regular expression :'(
I'm trying to find a line that contains $qV="stop"
EDIT : ok it's working but it doesnt find the text
Upvotes: 1
Views: 4043
Reputation: 626802
You need to use the following regex:
^.*\$qv="stop".*
It will match the whole lines containing $qv="stop"
.
Note that Notepad++ treats ^
/$
anchors as line start/end anchors, and thus you do not need to specify the /m
modifier.
Also, /i
case-insensitive mode can be set with Match Case
option. Uncheck it to use case-insensitive search mode.
A global search and replace is also performed using Notepad++ specific operation (Replace All button), thus, /g
modifier is redundant.
Regex delimiters are not used, and thus are treated as literals (together with the modifiers).
Upvotes: 1