Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Perl: the Markov chain saw
 
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'


Comment on Re: Lookahead/Lookbehind Regular Expression...
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-04-20 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls