regex - Can I apply word-casing to a string using regular expressions? -


Is it possible to convert an all-uppercase string into a string where only the first letter of each word is used in the upper case Is regular expressions?

This is a sample STRING ---> this is a sample string

I thought it would be an easy task, But now I do not even know how to start or even if it is possible. In Perl:

W '] +) / \ u \ l $ 1 / g;

(taken from the Pearl FAQ)


Comments