Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Can I have a hard stop on a match

by roboticus (Chancellor)
on Nov 17, 2017 at 14:01 UTC ( [id://1203665]=note: print w/replies, xml ) Need Help??


in reply to Can I have a hard stop on a match

BillB:

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1203665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found