pekkhum has asked for the wisdom of the Perl Monks concerning the following question:
It would be nice to have suggestions on how to do this or any PERL modules that would do better. Thanks.sub Regch{ $_[0]=~s/(\.|\-|\(|\)|\[|\]|\{|\}|\?|\/|\\|\^|\*)/\\$1/g; $_[0]=~s/([a-zA-Z])/[$1]/g; return $_[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Capitalization and Regex
by Abigail-II (Bishop) on Oct 26, 2003 at 22:50 UTC | |
by Anonymous Monk on Oct 27, 2003 at 00:26 UTC | |
by pekkhum (Sexton) on Oct 27, 2003 at 01:17 UTC | |
by graff (Chancellor) on Oct 27, 2003 at 04:55 UTC | |
by Anonymous Monk on Oct 27, 2003 at 08:50 UTC | |
|
Re: Capitalization and Regex
by etcshadow (Priest) on Oct 26, 2003 at 22:26 UTC | |
|
Re: Capitalization and Regex
by davido (Cardinal) on Oct 26, 2003 at 22:06 UTC | |
by Anonymous Monk on Oct 26, 2003 at 22:21 UTC | |
by Anonymous Monk on Oct 26, 2003 at 22:22 UTC | |
|
Re: Capitalization and Regex
by The Mad Hatter (Priest) on Oct 26, 2003 at 22:10 UTC | |
by davido (Cardinal) on Oct 26, 2003 at 22:16 UTC |