$myvar =~ /"(.*)"/; #### $myvar = qq(Tom said "hi. It's me," and Sally replied "get lost, Ovid is more my style. Doncha think?"); $myvar =~ /"(.*)"/; print $1; #### hi. It's me," and Sally replied "get lost, Ovid is more my style. Doncha think? #### $myvar =~ /"(.*?)"/; #### $myvar =~ /"([^"]*)"/; #### $myvar =~ /"((?:[^?"]|\?[^"])*)\?"/; #### $myvar =~ /" # First quote ( # Capture text to $1 (?: # Non-backreferencing parentheses [^?"] # Anything that's not a question mark or quote | # or \?[^"] # A question mark not followed by a quote (to allow embedded question marks) )* # Zero or more ) # End capture \?"/x; # Followed by a question mark and quote