in reply to Can you have partial case-insensitivty in a regexp?
Use (?i):
use strict; use warnings; my @strs = ( '<a href="http://somelink.com"', '<a href="http://SOMELINK.com"', '<a HREF="http://somelink.com"', ); for my $str (@strs) { print "$str matches\n" if $str =~ m|<a href=(?:(?i)"http://somelink. +com")|; }
Prints:
<a href="http://somelink.com" matches <a href="http://SOMELINK.com" matches
|
|---|