jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
(of course 'AAAAA' and 'BBBBB" represent text)$str = "AAAAA_BBBB" ; #or $str1 = "AAAAA" ($part1, $part2) = ($str =~ /^(\w+)_(\w+)$/ ) ; # works fine ($part1, $part2) = ($str1 =~ /^(\w+)[_(\w+)]$/ ) ; # NOPE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple regexp problem
by davidrw (Prior) on Dec 05, 2005 at 17:09 UTC | |
by pKai (Priest) on Dec 05, 2005 at 18:04 UTC | |
by davidrw (Prior) on Dec 05, 2005 at 18:21 UTC | |
|
Re: simple regexp problem
by choedebeck (Beadle) on Dec 05, 2005 at 17:08 UTC | |
by Celada (Monk) on Dec 05, 2005 at 17:41 UTC | |
by jeffa (Bishop) on Dec 05, 2005 at 18:07 UTC | |
by Tanktalus (Canon) on Dec 05, 2005 at 19:09 UTC | |
|
Re: simple regexp problem
by ikegami (Patriarch) on Dec 05, 2005 at 17:05 UTC | |
by ikegami (Patriarch) on Dec 05, 2005 at 17:46 UTC | |
by jeanluca (Deacon) on Dec 06, 2005 at 13:36 UTC | |
by ikegami (Patriarch) on Dec 06, 2005 at 15:31 UTC |