How quote matching works here
The matcher runs two passes. First it grabs every "..." span where the body is one or more characters that are not double quotes. Then it grabs every '...' span with the same rule for single quotes. The two lists are concatenated with double-quoted matches first, single-quoted second.
Smart curly quotes (“ ” ‘ ’) are not matched; only straight ASCII quotes " and ' are. To match curly quotes, run find and replace on the source first to swap “ and ” for ", and ‘ and ’ for '. Apostrophes inside contractions can interfere with single-quote matching: "don't" contains an apostrophe that breaks '...' spans on either side.
Output is one match per line, with the surrounding quote characters intact. Strip the quotes downstream with regex replace (pattern ^["']|["']$, empty replacement, multiline) if you want just the quoted bodies. Order is double-quoted matches in source order, then single-quoted matches in source order, not interleaved.
How to use extract quoted strings from text
- 1Paste the article, transcript or message into the input panel.
- 2The output panel shows every quoted string, one per line.
- 3Click Copy to copy the list.
- 4Click Download to save it as a plain-text file.
- 5To match smart curly quotes, swap them for straight quotes with find and replace first.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What counts as a quoted string here
Straight ASCII quotes only
Double " (U+0022) and single ' (U+0027). Smart curly quotes are not matched. Replace them with straight quotes first if your text uses typographic punctuation.
Body must contain at least one character
The pattern uses +, so empty quoted spans ("" or '') are not matched. Single-character quoted strings ("a") do match.
No nesting and no escapes
A " inside a double-quoted span ends the match early. There is no support for backslash-escapes (\") the way a programming language would handle them. For source code, treat the output as approximate.
Surrounding quotes kept
Each output line includes the opening and closing quote characters. "hello" is output as "hello". Strip them with regex replace if you only want the bodies.
Double-quoted matches first, then single-quoted
The output lists every double-quoted match in source order, then every single-quoted match in source order. The two are not interleaved. Apostrophes inside contractions can break single-quoted matches; consider running extract regex matches with a stricter pattern if your data has many contractions.
Worked example
Double-quoted matches come first ("hello", "meet at noon"), then single-quoted matches ('hi', 'utf-8'). Smart curly quotes would not match here; convert them to straight quotes first.
He said "hello" and she replied 'hi'. The note read "meet at noon". Use 'utf-8' when saving.
"hello" "meet at noon" 'hi' 'utf-8'
Settings reference
| Behaviour | Effect on output |
|---|---|
| Quote characters | Straight ASCII " and '. Smart curly quotes not matched. |
| Body length | At least one character. Empty "" and '' not matched. |
| Nesting and escapes | No support. An inner " ends the match early; \" is not unescaped. |
| Output ordering | Double-quoted matches first, then single-quoted, each in source order. |
| Surrounding quotes | Kept on every output line. Strip with regex replace if you want just the bodies. |
| Apostrophes in prose | Can break single-quoted matches. Mask them or use extract regex matches with a stricter pattern. |
FAQ
Why does my "don't worry" sentence give odd single-quoted results?
don't looks like a single quote to the matcher. When it scans for '...' spans it can pair the apostrophe with another single quote much later in the text. To avoid this, replace the apostrophe with a curly ’ (or any safe placeholder) using find and replace before extracting, then restore it after.Will smart curly quotes match?
" and ' only. Run find and replace first to swap “ ” for " and ‘ ’ for ', then extract.Are the quote characters included in each output line?
"hello" is output as "hello". To strip the surrounding quotes, run regex replace on the output with pattern ^["']|["']$, empty replacement, multiline flag.Why are double-quoted matches grouped before single-quoted ones?
"[^"]+"|'[^']+'.