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.

About Nate Hoffelder (11477 Articles)
Nate Hoffelder is the founder and editor of The Digital Reader: "I've been into reading ebooks since forever, but I only got my first ereader in July 2007. Everything quickly spiraled out of control from there. Before I started this blog in January 2010 I covered ebooks, ebook readers, and digital publishing for about 2 years as a part of MobileRead Forums. It's a great community, and being a member is a joy. But I thought I could make something out of how I covered the news for MobileRead, so I started this blog."

3 Comments on Time to Geek Out: Google Docs Now Supports Regular Expressions

  1. 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. Hooray! Google Docs is finally as powerful as vim!


Leave a comment

Your email address will not be published.