I have a string, and if there are two or more one-character units in it, I want to merge them ("J R EWING" --> "JR EWING")
I am using this:
$temp =~ s/\b(\w) (\w)\b/$1$2/g;
But it of course fails for "E T A HOFFMANN". Any thoughts?
"JR EWING") I am using this: $temp =~..." /> "JR EWING") I am using this: $temp =~..." /> "JR EWING") I am using this: $temp =~..."/>
In this particular case, you could use a lookahead.