Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have to split $test as the part1(server list), part2( Win2k..) and part3 (6.26...). If you take the second string there is know part2.I am using the following RE. It doesn't return any value for string $test1.$test="Server list (Win2K/Win2003/XP) 6.26.5.1.5"; $test1="Server list 6.26.5.1.5";
Can you please help me to get a reg exp which give part1,part2(if exists) and part3?.$test =~/(.*)(\(.+\))(.*)/); my $prod_name=$1; my $platform=$2; my $version=$3;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reg Exp
by mwah (Hermit) on May 26, 2008 at 09:36 UTC | |
by Anonymous Monk on May 26, 2008 at 10:18 UTC | |
|
Re: Reg Exp
by moritz (Cardinal) on May 26, 2008 at 09:33 UTC | |
|
Re: Reg Exp
by psini (Deacon) on May 26, 2008 at 09:37 UTC | |
by prasadbabu (Prior) on May 26, 2008 at 09:46 UTC | |
by psini (Deacon) on May 26, 2008 at 10:01 UTC | |
by chrism01 (Friar) on May 27, 2008 at 07:20 UTC |