in reply to Mixing the case of a line
Thus, "tHis is a TEST line oF,teXT" will become "This Is A Test Line Of,TEXT". If you have a lot of debris, like brackets, commas and whatnot, you might have to tweak this a bit to better match your definition of "word". Do you want it to be "Free-Lance" or "Free-lance"?$_ = ""; s/\b(\w+)\b/\u\L$1/g; s/(\w+\s*)$/\U$1/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Mixing the case of a line
by danger (Priest) on Nov 16, 2001 at 02:32 UTC |