S
Stefan Rupp
Good afternoon,
we have a perl regular expression which always worked for us on
Solaris(SPARC) HPUX(IA64) and Debian GNU/Linux(i386). But now I have to
install a software on a RedHat based GNU/Linux i386 box and the same
expression does not work any longer.
See the following script:
----------------------------------------------------------
#!/usr/bin/perl
print "Enter lines with 'key = value'\n";
while ( <STDIN> ) {
if ( /^\s*([^\s=]+)\s*=\s*([^\"]\S*|\".*\")\s*/ ) {
print "Match! key = '$1', value = '$2'\n";
}
else {
print "No match.\n";
}
}
----------------------------------------------------------
On Debian (Woody) with Perl 5.6.1 it works, it matches lines like
a = b
On HPUX(IA64) with Perl 5.8.0 it works as well. On RedHat 9 with Perl
5.8.0 however, it does not match at all.
What am I doing wrong?
Any help is appreciated!
Regards,
Stefan
we have a perl regular expression which always worked for us on
Solaris(SPARC) HPUX(IA64) and Debian GNU/Linux(i386). But now I have to
install a software on a RedHat based GNU/Linux i386 box and the same
expression does not work any longer.
See the following script:
----------------------------------------------------------
#!/usr/bin/perl
print "Enter lines with 'key = value'\n";
while ( <STDIN> ) {
if ( /^\s*([^\s=]+)\s*=\s*([^\"]\S*|\".*\")\s*/ ) {
print "Match! key = '$1', value = '$2'\n";
}
else {
print "No match.\n";
}
}
----------------------------------------------------------
On Debian (Woody) with Perl 5.6.1 it works, it matches lines like
a = b
On HPUX(IA64) with Perl 5.8.0 it works as well. On RedHat 9 with Perl
5.8.0 however, it does not match at all.
What am I doing wrong?
Any help is appreciated!
Regards,
Stefan