"Mark Healey" <> wrote in message
news

...
> I'm trying to craft a search that capitalizes letters depending on
their
> context, specifically after a space or the beginning of a string.
>
> For example I'd like to turn
>
> the quick brown fox jumped over the lazy dogs.
>
> to
>
> The Quick Brown Fox Jumped Over the Lazy Dogs.
>
> Is this doable on a single line?
What have you tried so far?
Have you read the posting guidelines for this group, posted twice a
week?
Because I'm feeling generous (and bored) anyway:
s/(^|\s)([a-z])/$1\u$2/g;
for more information on ^, |, (), $1 & $2:
perldoc perlre
perldoc perlretut
perldoc perlreref
for more information on \u:
perldoc -f ucfirst
Paul Lalli