Re: how to add a space using a regex



John Bokma <john@xxxxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
> "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@xxxxxxxxxxxxx> wrote:
>
> > I suggest that two letter first names are quite rare,
>
> Not 2 letter first names, but for example TadMcClellan

How is that an objection?

s/([[:alpha:]][[:lower:]])([[:upper:]])/$1 $2/g;

makes "Tad McClellan" as it should.

Ed, Al, Ty, Bo, Jo, Ma, Lu and Vi would be out of luck.

A US name list (from the Census Bureau) lists 6 male and 27(!) female
two-letter names.

Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
.



Relevant Pages

  • Re: how to add a space using a regex
    ... >> I suggest that two letter first names are quite rare, ... > Not 2 letter first names, but for example TadMcClellan ... I get junk mail addressed to: ...
    (comp.lang.perl.misc)
  • Re: how to add a space using a regex
    ... John Bokma wrote: ... > Not 2 letter first names, but for example TadMcClellan ... you can safely assume that 2 letter names are too rare ...
    (comp.lang.perl.misc)
  • Re: how to add a space using a regex
    ... > I suggest that two letter first names are quite rare, ... Not 2 letter first names, but for example TadMcClellan ... Prev by Date: ...
    (comp.lang.perl.misc)