Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is this a job for a regular expression? I want to match a character followed by anything else except for that first character. I've tried it with backtraces, but that obviously not possible
Example (fake code):/L$str = '...+...'; $str =~ /(.)[^\1]/; # And now I had in mind to have $& containing '.+'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Anything else is fine!
by MidLifeXis (Monsignor) on Feb 08, 2010 at 17:23 UTC | |
|
Re: Anything else is fine!
by kennethk (Abbot) on Feb 08, 2010 at 17:22 UTC | |
|
Re: Anything else is fine!
by BrowserUk (Patriarch) on Feb 08, 2010 at 17:30 UTC | |
by MidLifeXis (Monsignor) on Feb 08, 2010 at 17:36 UTC | |
by AnomalousMonk (Archbishop) on Feb 08, 2010 at 20:17 UTC | |
|
Re: Anything else is fine!
by Anonymous Monk on Feb 08, 2010 at 17:43 UTC | |
|
Re: Anything else is fine!
by repellent (Priest) on Feb 10, 2010 at 01:58 UTC |