Re: how to add a space using a regex
- From: John Bokma <john@xxxxxxxxxxxxxxx>
- Date: 31 Aug 2005 08:07:55 GMT
"Jerry Preston" <g-preston1@xxxxxx> wrote:
> What I want to do is add a space between one's name when the are like
> the following:
>
> $name1 = "FirstLast:";
>
> I want change $name1 = "First Last";
>
> and
>
> $name1 = "FirstMiddleLast:";
>
> I want change $name1 = "First Middle Last";
>
> To be able to add spaces for either "FirstLast:" or "FirstMiddleLast:"
> with the same regex?
s/([a-z])([A-Z])/$1 $2/g;
(Wonders about Old McDonald)
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
.
- Follow-Ups:
- Re: how to add a space using a regex
- From: Alan J. Flavell
- Re: how to add a space using a regex
- References:
- how to add a space using a regex
- From: Jerry Preston
- how to add a space using a regex
- Prev by Date: Re: how to add a space using a regex
- Next by Date: Re: how to add a space using a regex
- Previous by thread: Re: how to add a space using a regex
- Next by thread: Re: how to add a space using a regex
- Index(es):