F
Francois Massion
My problem:
#!/usr/bin/perl
$shortStr = 'CAD++ mit';
$longStr = 'CAD++ mit zusätzlichen Scanning- und
Digitalisierfunktionen';
if($longStr =~ /$shortStr/){
# Action...
}
#__end__
(1) First I got a "nested quantifier" error message because of "++" in
the regex.
(2) After reading some contributions and the perlfunc entry on
quotemeta I wrote:
if($longStr =~ /\Q$shortStr\E/){
and now I get a "unrecognized escape \q passed through at ..." message.
Has anyone a suggestion?
Thanks
Francois
#!/usr/bin/perl
$shortStr = 'CAD++ mit';
$longStr = 'CAD++ mit zusätzlichen Scanning- und
Digitalisierfunktionen';
if($longStr =~ /$shortStr/){
# Action...
}
#__end__
(1) First I got a "nested quantifier" error message because of "++" in
the regex.
(2) After reading some contributions and the perlfunc entry on
quotemeta I wrote:
if($longStr =~ /\Q$shortStr\E/){
and now I get a "unrecognized escape \q passed through at ..." message.
Has anyone a suggestion?
Thanks
Francois