Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: regex issue

by kroach (Pilgrim)
on Aug 03, 2016 at 20:21 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1169104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found