in reply to Capitalization and Regex
Update Removed character class redundacy. That will teach me to at least look at the regex before posting... ; )sub Regch{ $_[0]=~s/(\.|\-|\(|\)|\[|\]|\{|\}|\?|\/|\\|\^|\*)/\\$1/gi; $_[0]=~s/([a-z])/[$1]/gi; return $_[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Capitalization and Regex
by davido (Cardinal) on Oct 26, 2003 at 22:16 UTC |