Did you intend to match on the single quotes?
Maybe your regex should be be something like this :-
my $regex1 = qr/'(.*?):(.*?)'/;If there can not be more than one colon then using character classes may be better
my $r1 = qr/'([^:]*):([^']*)'/;In reply to Re: Regex not working
by RichardK
in thread Regex not working
by Perllace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |