Highlight the double Words

Posted by murugaperumal on Stack Overflow See other posts from Stack Overflow or by murugaperumal
Published on 2010-03-24T03:51:55Z Indexed on 2010/03/24 3:53 UTC
Read the original article Hit count: 549

Filed under:
|

I am having the following inputs.

$str = "Thus joyful Troy Troy maintained the the watch of night..."

I want the following output

 Thus joyful [Troy Troy] maintained [the the] watch of night...

© Stack Overflow or respective owner

Related posts about perl

Related posts about regex