[Tutor] I'm drawing a blank on a simple (?) regex
Kent Johnson
kent37 at tds.net
Tue May 23 18:02:48 CEST 2006
R. Alan Monroe wrote:
> I'm searching through SQL logs and want to find lines that have
> WHERE-less (unbounded) queries. I can't come up with a regex to say:
>
> SELECT.*FROM.*(the word WHERE must not exist anywhere in the remainder
> of the line)
>
> Am I forgetting something simple or would this take two passes?
Try using a negative look-ahead:
SELECT.*FROM(?!.*WHERE)
Kent
More information about the Tutor
mailing list