$_[0]=~s/([a-zA-Z])/[$1]/gi;
Of course with the /i modifier, [a-zA-Z] becomes redundant, and so, can be expressed as simply [a-z], assuming we're dealing with ASCII.
Dave
In reply to Re: Re: Capitalization and Regex
by davido
in thread Capitalization and Regex
by pekkhum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |