Time to Geek Out: Google Docs Now Supports Regular Expressions

google-docs-regular-expressions-regexIt’s time to get your RegEx on, because Google has updated the web version of Google Docs with support for regular expressions.

For those not familiar with the term,  regular expressions are a way to define search terms so that you get back more than just references to a single term.

For example, you could search a document for the zip code 22193, and find all the places where that set of numbers show up. Or you could search for 221[0-9](2), and you will find all the places in a document where the zip codes 22191, 22192, 22193, etc, can be found.

You can think of this as kinda cutting edge find and replace, but it would be more accurate to call it an intermediate-level programming skill. Not everyone knows how to do it, and it is possible to make horrible, horrible mistakes if I’m not careful, but in the right hands regular expressions are immensely useful.

And now it is supported in Google Docs – but only on the web.

Android Police said that Google Docs accepts expressions which follow RE2 syntax, so it might be worth even an experienced RegEx wizard’s while to bone up on the specifics.

And if you’re only encountering regular expressions for the first time, Google has also posted a helpful support doc.

Nate Hoffelder

View posts by Nate Hoffelder
Nate Hoffelder is the founder of The Digital Reader. He has been blogging about indie authors since 2010 while learning new tech skills weekly. He fixes author sites, and shares what he learns on The Digital Reader's blog. In his spare time, he fosters dogs for A Forever Home, a local rescue group.


  1. Anne-Maree Gray27 September, 2016

    All I want in google docs is a decent word counter – one that can keep track of words added through the doc – like a daily total.

  2. Jason van Gumster28 September, 2016

    Hooray! Google Docs is finally as powerful as vim!


    1. Ed Bear28 September, 2016

      To quote the general in a story I read: “I’ll take what I can get.”

Leave a Reply

Scroll to top