in reply to Re: Useful Uses of regex code expressions?
in thread Useful Uses of regex code expressions?

Very nice! I especially like the partial backreferences.

It is possible to dynamically build character classes the ordinary way:
foreach my $char (a..d) { print "bbb matches $char\n" if "bbb" =~ /[$char]/; }
prints
bbb matches b

Thanks for expanding my horizons!

-Mark