Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 having an uproarious good time at the Monastery: (4)
As of 2014-12-19 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (72 votes), past polls