Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: regex issue

by kroach (Pilgrim)
on Aug 03, 2016 at 20:21 UTC ( #1169104=note: print w/replies, xml ) Need Help??


in reply to Re^2: regex issue
in thread regex issue

Small correction, you missed a word-boundary assertion in the look-ahead. The regex should be:
/\b(\w\w\w)\b(?=.*\b\1\b)/g
Without the additional \b before \1, three-letter words that are trailing substrings of other words would also match.

Replies are listed 'Best First'.
Re^4: regex issue
by ExReg (Priest) on Aug 03, 2016 at 20:25 UTC

    Thanks. I missed that copying from the PC that has perl that I tested this on to this one.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2019-11-11 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (63 votes). Check out past polls.

    Notices?