r has asked for the wisdom of the Perl Monks concerning the following question:
Looking forward to your answers,while (<>) { s/(.)((?!\1).)\2(?!\2)/$1\($2$2\)$3/g; s/^(.)\1(?!\1)/\($1$1\)$2/; print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to do it in one line?
by Courage (Parson) on Jul 03, 2002 at 22:40 UTC | |
by blakem (Monsignor) on Jul 04, 2002 at 06:49 UTC | |
by r (Initiate) on Jul 04, 2002 at 10:22 UTC | |
|
Re: How to do it in one line?
by Abigail-II (Bishop) on Jul 04, 2002 at 11:03 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2002 at 15:16 UTC | |
by Abigail-II (Bishop) on Jul 08, 2002 at 16:28 UTC |