in reply to Using special characters in left part of a regex match?
with special characters you mean the regex wildcards you're including for ... and the answer is no.
in short
$var[1] = "Gallia est omnis divisa in .+"; $var[5] = "Gallia est .+ tres"; $var[1] =~ $var[5] ;# false
what could maybe work is to successively strip common beginning and/or ending parts.
"Gallia est ..." is the smallest starting substring till an ellipsis.
Deleting it from both strings:
$var[1] = "omnis divisa in ..."; $var[5] = "... tres";
this configuration is always true.
such a strategy might work.
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using special characters in left part of a regex match?
by shamat (Acolyte) on Feb 06, 2013 at 16:56 UTC |