$ perl -wE' my $regex = q{Haus \d}; my $string = "Haus 42"; say "Regex: $regex"; if ($string =~ m/$regex/) { say "match"; } ' Regex: Haus \d match