J
joeri
Hi all,
I have an RE where I use the (?i) somewhere, but I want to undo that effect
further on in the RE.
Here's an example:
$var="(?i)(forty|fifty)";
$input = "Forty-ninth ST";
if ($input =~ /$var(\-ninth)\s[S|s]t/) {
print "$&\n";
}
Because the $var contains the (?i), it matches the rest of the RE
case-insensitively, but I want
to match everything after the $var case-sensitively. Can I escape the ($i)
or set the scope of it?
Thanks,
J
I have an RE where I use the (?i) somewhere, but I want to undo that effect
further on in the RE.
Here's an example:
$var="(?i)(forty|fifty)";
$input = "Forty-ninth ST";
if ($input =~ /$var(\-ninth)\s[S|s]t/) {
print "$&\n";
}
Because the $var contains the (?i), it matches the rest of the RE
case-insensitively, but I want
to match everything after the $var case-sensitively. Can I escape the ($i)
or set the scope of it?
Thanks,
J