Hena has asked for the wisdom of the Perl Monks concerning the following question:
Now that code prints out what i expect it to:#!/usr/bin/perl # # pattern match testing # use warnings; use strict; # use re 'debug'; my $str = 'triple hybrid: dehyd: triple hybrid: dehydrofolate reductas +e reconstruction ;MI:0111'; $str =~ s/(.+): \1/$1/; print "'$1'\n$str\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Understanding regex
by hv (Prior) on Apr 29, 2005 at 11:07 UTC | |
by Hena (Friar) on Apr 29, 2005 at 11:44 UTC | |
by Fletch (Bishop) on Apr 29, 2005 at 12:57 UTC | |
by eXile (Priest) on Apr 29, 2005 at 13:12 UTC | |
|
Re: Understanding regex
by deibyz (Hermit) on Apr 29, 2005 at 11:09 UTC | |
|
Re: Understanding regex
by Animator (Hermit) on Apr 29, 2005 at 11:44 UTC | |
by Hena (Friar) on Apr 29, 2005 at 11:53 UTC |