Both your solution and husoft's fail on a single character string. As "x" consists of a single character and that character is both the first and the last it should be capitalized.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: help with a regexp
by sauoq
in thread help with a regexp
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |