my $data = 'AS5300 chassis, Hw Serial#: 27539697, Hw Revision: A.32';
if ($data =~ /Serial#: (.*?), Hw Revision: (.*?)/i) {
print "$1\n";
print "$2\n";
}
Not working as expected
output is only.
27539697
Thanks in advance as always..!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
if ($data =~ /Serial#: (.*?), Hw Revision: (.*?)/i) {
print "$1\n";
print "$2\n";
}
Not working as expected
output is only.
27539697
Thanks in advance as always..!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;