Google Apps Script: Get Google Doc Text Based on Reference Characters

Last Updated on 2021-10-31 by Jarret Hooper

Google Apps Script: Google Docs, Document App. Javascript: Spread syntax, Set, IndexOf, Substring

So here is the scenario, imagine you have a big Google Doc. You want to get a list of information from the document that you have noticed are between two sets of characters. Maybe something like this:

  1. You want to grab all the quoted text in a story and you know that the quoted test is between two sets of quotation marks: “ ”.
  2. You want to grab citations or asides inside different braces, for example, [],{} or ().
  3. You are making a mail merger and you want to grab a specific list of words that the user put in that is to be substituted based on special character identifiers, for example, {{name}}, {{phone}}.
  4. You want to grab all the websites in a Google doc and you know they start will start with https:// and with .gov .

This tutorial provides a simple how-to do this.  Perhaps the code is exactly what you need for your project. We’ve set it up in a way that is easy to implement in your own project.

Continue reading “Google Apps Script: Get Google Doc Text Based on Reference Characters”

Google Sheets: Get the Number of Words or Sentences in a Cell (Paragraph)

Last Updated on 2021-10-31 by Jarret Hooper

Google Sheets: ROUND, SPLIT, COUNTA

Have you ever woken up in the middle of the night thinking – phawh! I’d really like to know how many words there are in a paragraph – Or stopped mid-chew on some arbitrary item carelessly left in the paddock by the boss and thought – geez! If there was only a way to count the number of sentences in a paragraph in a cell in Google Sheets!?

Well, you’re a bit weird, but I guess you are in the right place.

In this short tutorial, we will show you how to get the total count of words in a cell and the total count of sentences in a cell in Google Sheets. Hey, we will even throw in a how-to on getting the average sentence length in a paragraph, because we are nice like that – and we are a bit weird too.

We’ll give you the formulas for you to jump off on your own project straight away. We’ll also give you a detailed explanation of the formulas so you can figure out how it all works using our example.

Navigate through the table of contents to get to what you need or read on!

Continue reading “Google Sheets: Get the Number of Words or Sentences in a Cell (Paragraph)”

%d bloggers like this: