Hi Everyone,
Does anyone know how to search for square brackets using a regular expression?
I'm trying to block the following type of HELO greeting:
EHLO [190.122.125.138]
I have used [Z-a] to successfully capture "[" and "]" characters, but to me this is a bit of a fudge. Using [[] or []] doesn't work.
This is what I use at present, and it works, but I want improve it:
H, "[heHE][heHE]LO/w[Z-a][0-9]+.[0-9]+.[0-9]+.[0-9]+[Z-a]/w", L, "CAUGHT DOTTED IP WITH SQ BRACKETS IN HELO USING Z-a"
So, does anyone know if it is possible to search for "[" or "]" perhaps by using an escape command (if one exists)?
Thanks in advance :)
<p>Hi Everyone,&nbsp;</p><p><span style="font-size: 10pt;">Does anyone know how to search for square brackets using a regular expression?&nbsp;</span></p><p>I'm trying to block the following type of HELO greeting:</p><p>EHLO [190.122.125.138]</p><p><span style="font-size: 10pt;">I have used [Z-a] to successfully capture "[" and "]" characters, but to me this is a bit of a fudge. Using [[] or []] doesn't work.</span></p><p><span style="font-size: 10pt;">This is what I use at present, and it works, but I want improve it:&nbsp;</span></p><p>H, "[heHE][heHE]LO/w[Z-a][0-9]+.[0-9]+.[0-9]+.[0-9]+[Z-a]/w", L, "CAUGHT DOTTED IP WITH SQ BRACKETS IN HELO USING Z-a"</p><p><span style="font-size: 10pt;">So, does anyone know if it is possible to search for "[" or "]" perhaps by using an escape command (if one exists)?</span></p><p>Thanks in advance :)&nbsp;</p>