Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-02-26 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (113 votes). Check out past polls.

    Notices?