"be consistent" | |
PerlMonks |
Re: Can I have a hard stop on a matchby roboticus (Chancellor) |
on Nov 17, 2017 at 14:01 UTC ( [id://1203665]=note: print w/replies, xml ) | Need Help?? |
I'd suggest placing "\s" just before and after doc in your regex, so it will accept doc as a word instead of as a word fragment. Since you only want to match it if it precedes '(', 'SELECT' or ';', another way to do it would be to split your string on any of those tokens before doing your check, so any subselect or statement following your insert would be excluded from your match. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|