in reply to \q quote-matching operator

You can add this yourself. See perlre at the end.

package Regexp::Quotes; use overload; sub import { shift; die "No argument allowed to Regexp::Quotes::import" if @_; overload::constant qr => \ &convert; } sub invalid { die "/$_[0]/: invalid escape '\\$_[1]'"; } my %rules = ( '\\' => "\\", 'q' => qr/[\'\" .... ]/ ); # Extend this sub convert { my $re = shift; $re =~ s( \\ ( \\ | q ) ) { $rules{$1} or invalid( $re, $1 ) }gex; $re; }