R
Risto Vaarandi
hi,
I have a perl program that has worked for 2 years on redhat and solaris
nodes without problems. Recently I moved it to a redhat9 node (which has
utf8 as default system character set), and discovered that the following
regular expression inside the program does not work:
if ($line =~ /^\s*([^=\s]+)\s*=\s*(.*\S)/) {
$keyword = $1;
$value = $2;
}
When the regexp is written as /^\s*(\w+)\s*=\s*(.*\S)/, or as
/^\s*([^=]+)\s*=\s*(.*\S)/ , everything works fine. What could be the
problem here? (When I change the system charset from UTF8 to iso8859-1,
it works.)
br,
risto
I have a perl program that has worked for 2 years on redhat and solaris
nodes without problems. Recently I moved it to a redhat9 node (which has
utf8 as default system character set), and discovered that the following
regular expression inside the program does not work:
if ($line =~ /^\s*([^=\s]+)\s*=\s*(.*\S)/) {
$keyword = $1;
$value = $2;
}
When the regexp is written as /^\s*(\w+)\s*=\s*(.*\S)/, or as
/^\s*([^=]+)\s*=\s*(.*\S)/ , everything works fine. What could be the
problem here? (When I change the system charset from UTF8 to iso8859-1,
it works.)
br,
risto