Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: grep match variable position

by QuillMeantTen (Friar)
on May 16, 2016 at 11:56 UTC ( #1163131=note: print w/replies, xml ) Need Help??


in reply to grep match variable position

Just my two cents here,
for each $word why dont you create a custom regex array instead of just a stopword array? You might like reading this regarding the proper storage of your regexes.
your standard regex could look like something like this:

#!/usr/bin/perl my $string = $ARGV[0]; if($string =~ m#(\Aof|of\z)#){ print "matched out at start or end\n"; }
tested on my machine.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2022-05-25 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?