in reply to Maybe Escape in Dynamic RegExps
This does what you want.
my $re = qr/(?<!\Q$c\E)\Q$d\E/;
The \Q . . \E pair is like quotemeta. I've changed the names to protect sort. Extra ( . . ) delimiter pair is cut.
An electronic device
Being the designated driver
Spending time with a celebrity
I never won anything
I never play the lottery
I haven't checked my spam folder recently
Results (361 votes). Check out past polls.