Search in files by regexp - Unrecognized Modifier

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
STMA
New Member
New Member
Posts: 1
Joined: 2018-12-07, 10:56 UTC

Search in files by regexp - Unrecognized Modifier

Post by *STMA »

Hi, I want to search for potentital SQL injection vulnerabilities in my PHP project.
I'm trying to use this regexp: =[\s]*'"[^\w]*(?<!\(int\))\$(?!(this->db->escape|db->escape))[\w]+
But TotalCmd returns this alert: Unrecognized Modifier (pos 24)
Can someone help me?
Thanks.
User avatar
Stefan2
Power Member
Power Member
Posts: 4153
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Search in files by regexp - Unrecognized Modifier

Post by *Stefan2 »

Hi and welcome.

In TC press 'F1' on your keyboard and [Search] for 'regex' to read about the syntax and the engine TC utilizes.

Or use this path in help: [Content] > Operation > Regular expressions





Some first notes:
- lock around is not supported. ((("?!" is a negative lookahead, isn't it ?, ah, and there is a "?<!" too)))
- the sign '>' may be interpreted as a regex metachar. Try using a dot instead. ((("this->db->escape" >> "this-.db-.escape"))) Or escape it: "-\>".


 
Post Reply