Skip to main content

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.

Similar Articles


Anne-Maree Gray September 27, 2016 um 10:37 pm

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.

Jason van Gumster September 28, 2016 um 11:44 am

Hooray! Google Docs is finally as powerful as vim!


Ed Bear September 28, 2016 um 3:10 pm

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

Write a Comment