Google Docs is Google’s online word processor. It runs in your browser. You can press Ctrl+H or select Edit|Find and Replace in the menu to search through your document. Tick the "use regular expression" checkbox to enable regular expressions. Google Docs uses your browser’s regex engine. The regex flavor is referred to as the JavaScript without the /u flag in the regular expressions tutorial and reference on this website. Ticking "match case" checkbox makes the regular expression case sensitive, which is the default in JavaScript. Unticking "match case" makes the regexp case insensitive, which is equivalent to passing the /i flag to the RegExp constructor in JavaScript code. Google Docs does not expose any other flags of JavaScript’s RegExp object.
Google Docs automatically highlights all regex matches. Click the Previous and Next buttons to cycle between the matches.
To make replacements, enter the replacement text into the "replace with" box. Google Docs only accepts literal text as the replacement. It does not use JavaScript’s replacement text syntax. There’s no way to use backreferences in the replacement text. To actually make a replacement, click the Replace button to replace only the selected regex match, or click Replace All to replace all highlighted regex matches.
| Quick Start | Tutorial | Search & Replace | Tools & Languages | Examples | Reference |
| grep | PowerGREP | RegexBuddy | RegexMagic |
| EditPad Lite | EditPad Pro | Google Docs | Google Sheets | LibreOffice | Notepad++ |
| Boost | C# | Delphi | F# | GNU (Linux) | Groovy | ICU (Unicode) | Java | JavaScript | .NET | PCRE (C/C++) | PCRE2 (C/C++) | Perl | PHP | POSIX | PowerShell | Python | Python.NET and IronPython | R | RE2 | Ruby | std::regex | Tcl | TypeScript | VBScript | Visual Basic 6 | Visual Basic (.NET) | wxWidgets | XML Schema | XQuery & XPath | Xojo | XRegExp |
| Google BigQuery | MySQL | Oracle | PostgreSQL |
Page URL: https://www.regular-expressions.info/googledocs.html
Page last updated: 11 October 2025
Site last updated: 14 October 2025
Copyright © 2003-2025 Jan Goyvaerts. All rights reserved.