Straight to curly quotes, step 2: closing quotes
Step 2 of 2. After step 1, every straight double quote that is left closes a quote, so it becomes a closing curly quote. Always run step 1 first.
\x{0022}~}Copy a tested expression for Find/Change or GREP styles. Every pattern is shared by a designer, with their name on it.
Run all of these at once with the free GREP Batch Processor.
New to GREP? Learn the basics in 10 minutes All special characters
Step 2 of 2. After step 1, every straight double quote that is left closes a quote, so it becomes a closing curly quote. Always run step 1 first.
\x{0022}~}Step 1 of 2. Turns a straight double quote into an opening curly quote when it starts a paragraph or follows a space or an opening bracket. Run step 2 right after it.
(^|[\s(\[])\x{0022}$1~{Replaces two or more regular spaces with a single space, a common problem after a Word import. Tabs, em spaces and other special spaces are left alone, so layout spacing is not touched.
{2,} Standardizes US phone number format to hyphen separators. Changes 555.123.4567 to 555-123-4567.
(\d{3})[.\s](\d{3})[.\s](\d{4})$1-$2-$3Converts asterisk to multiplication sign when between numbers or parentheses. For mathematical expressions.
(?<=[\d)])\*(?=[\d(])×Converts European dot-separated dates to slash format. Changes 25.12.2024 to 25/12/2024.
\b(\d{1,2})\.(\d{1,2})\.(\d{2,4})\b$1/$2/$3Adds leading zero to single-digit hours in time notation. Changes 9:30 to 09:30 for 24-hour format consistency.
\b(?<!\d)([1-9]):(\d{2})\b0$1:$2Reduces multiple punctuation marks before dashes to a single mark. Captures first punctuation and removes duplicates.
([.!?])[.!?]+(?=[—–-])$1Converts space-separated thousands to comma-separated. Changes 1 000 to 1,000 for US number format.
(\d)\s(\d{3})(?=\b)$1,$2Converts letter x/X between numbers to multiplication sign. For dimensions like 8.5×11.
(?<=\d)\s*[xX]\s*(?=\d)×Converts straight apostrophe to curly in decade abbreviations like '90s, '80s, '70s. Uses lookbehind for space and lookahead for two digits followed by 's'.
(?<=\s)'(?=\d{2}s)’Converts European dot thousand separator to US comma. Changes 1.000 to 1,000 format.
(?<=\d)\.(?=\d{3}\b),Converts multiple spaces between numbers to tab. For aligning numeric columns in tables.
(?<=\d)\s{2,}(?=\d)\tConverts spaced hyphens between numbers to closed en-dash. Fixes '10 - 20' to '10–20' range format.
(?<=\d)\s+-\s+(?=\d)–Converts apostrophe between digits to prime symbol. For feet/inches notation like 5′10″.
(?<=\d)'(?=\d)′Converts straight apostrophes to curly in French elisions (l'amour, d'accord, c'est, etc.). Case-insensitive pattern targets common French elision letters.
(?i)\b([cdjlmnstqu])'(?=\w)$1’Removes closing curly quote appearing between word characters. Cleans up import artifacts where quotes ended up inside words.
(?<=\w)”(?=\w)Replaces the regular space before a colon with a nonbreaking space. French typography requires space before colons.
(?<=\w)\s(?=:)~SRemoves space before quote followed by punctuation. Fixes spacing like 'word ". ' patterns.
\s+(["'])([.,])$1$2Converts hyphen in citation ranges to en-dash. Changes [1-5] to [1–5] for proper formatting.
\[(\d+)-(\d+)\][$1–$2]Removes space between currency symbol and number. Fixes $ 100 to $100 format.
([$€£])\s+(\d)$1$2Adds space after em-dash at start of paragraph when followed by word. Fixes European-style dialogue formatting.
^(—)(\w)— $2Converts straight apostrophes to curly in names like O'Brien, O'Connor, McDonald's. Targets capitalized patterns typical of Irish/Scottish surnames.
\b([A-Z][a-z]*)'([A-Z])$1’$2Adds missing space after closing quote when not followed by space or punctuation. Fixes run-together text after quoted sections.
”(?![\s.,!?;:])” Removes spaces around colon in time notation. Normalizes 10 : 30 to 10:30 format.
(\d)\s*:\s*(\d)$1:$2Converts multiple dots (manual dot leaders) to tab before page numbers. For TOC cleanup.
\.{3,}\s*(?=\d)\tConverts hyphens used as bullet markers at the start of lines into proper bullet characters. Commonly needed when importing plain text or markdown.
(?m)^-\s*(?=\w)• Removes spaces around slashes between digits. Normalizes date separators.
(?<=\d)\s*/\s*(?=\d)/Removes period after page numbers at line end. Cleans up TOC and index formatting.
(?<=\d)\.(?=\r|$)Reduces multiple exclamation or question marks to single. Removes emphatic multiple punctuation like !! or ??.
([!?]){2,}$1Adds missing space after comma when followed by letter. Fixes run-together text like 'hello,world'.
,(?=[A-Za-z]), Removes spaces before apostrophe in mid-word position. Fixes broken contractions like don 't to don't.
(?<=\w)\s+’(?=\w)’Removes comma, semicolon, or colon at paragraph end. These punctuation marks shouldn't end paragraphs.
([,;:])(?=\r)For author lists and indexes: one name per paragraph, with an optional middle initial, becomes surname first.
^([A-Z][a-z]+(?: [A-Z]\.)?) ([A-Z][a-z'-]+)$$2, $1Catches doubled words in any case, like “the The” at a line break in the manuscript, and keeps the first one.
(?i)\b(\w+)\s+\1\b$1Removes typed bullet characters so a paragraph style with real bullets can take over.
^[•\-–*]\s+Strips manual numbering at the start of paragraphs before you apply an automatic numbered list style.
^\d+[.)]\s+Matches only what is between the brackets, for example to italicize editorial notes like [sic] while the brackets stay upright.
(?<=\[)[^\]]+(?=\])GREP style with a superscript character style. The word boundary keeps it off words like “1stop”.
(?<=\d)(?:st|nd|rd|th)\bGREP style with a No Break character style, so the last line of a paragraph always has at least two words.
\S+ \S+$GREP style for words of three or more capitals, set as OpenType all small caps so acronyms don’t shout.
\b[A-Z]{3,}\bFinds prices with thousands separators and optional cents, ready for a price character style.
[$€£]\d{1,3}(?:,\d{3})*(?:\.\d{2})?GREP style with a character style set to No Language, so email addresses never hyphenate.
[\w.+-]+@[\w-]+(?:\.[\w-]+)+Finds addresses starting with http or www, without the punctuation that ends the sentence. Use a No Language style to stop hyphenation.
\b(?:https?://|www\.)\S+[^\s.,;:!?)]Removes invisible spaces and tabs left before the paragraph return.
[ \t]+(?=\r|$)Deletes the blank paragraphs people type for spacing, so Space Before and After can do the job.
(?<=\r)\r+Cleans up spaces typed before or after a tab, so tab stops line up exactly.
*\t *\tRemoves spaces and tabs used to fake a first-line indent. Use the paragraph style’s indent instead.
^[ \t]+Finds one- or two-digit fractions like 1/2 or 3/4 for a fraction style, and leaves longer number groups such as dates alone.
(?<![\d/])\d{1,2}/\d{1,2}(?![\d/])Shortens figure references when a number follows, and leaves the word “figure” in normal text untouched.
\bFigure\s+(\d+)Fig. $1Members who share a GREP get their name on the pattern and a profile page with photo, bio, and links.