Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Lookahead/Lookbehind Regular Expression...

by educated_foo (Vicar)
on Dec 20, 2013 at 00:51 UTC ( #1067905=note: print w/replies, xml ) Need Help??


in reply to Lookahead/Lookbehind Regular Expression...

I wouldn't bother with look-ahead/behind on this problem:
$_ = 'u.s. asdf.g. and i. M.C. Escher and P. Picasso'; s/\b(\w)\.(\w)\./$1$2/g; # $_ eq 'us asdf.g. and i. MC Escher and P. Picasso'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1067905]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2016-12-10 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.