Reputation: 1
I am writing a regex to capture SQL Injection Keywords on the HTTP request. I am having problems with allowing 0 or more carriage returns.
I have tried \s but I get the error 'errorInvalidEscaperChar'.
If I put \s then this will be taken as a literal \s.
Any ideas please?
Thanks
N
Upvotes: 0
Views: 1650
Reputation: 1416
"\" is a citation character in regexp and Java. So you need to write \\s
Upvotes: 1
Reputation: 63734
You have to escape the backslash in Java Strings. So, to get a backslash followed by an s, you need to write: "\\s
".
But let's take a step back, what are you trying to achieve? Searching in parameters for "SQL Injection Keywords" might be a bad idea. Could you provide some details?
Upvotes: 1