title: How to replace all found ocurrences in a Google Docs for an hyperlink
body: <p>We are actually wondering how can you for example find Bible verses in the document text and replace them for an URL of the verse on the web.</p>
  
  <p>For example if you have a "Jn 3.1" text it will be replaced for an hiperlink like this:</p>
  
  <pre><code>Text= Jn 3.1
  Link= https://www.bible.com/1/jn.3.1
  </code></pre>
  
  <p>we though on using <code>Body.replaceText(searchPattern, replacement)</code> but you cant use that for insert an hyperlink.</p>
  
  <p>And also we must think that the number of characters of the verse can change, for example, it can be:</p>
  
  <blockquote>
    <p>Jn 1.3</p>
  </blockquote>
  
  <p>that is 6 characters or can be </p>
  
  <blockquote>
    <p>John 10.10</p>
  </blockquote>
  
  <p>that is 10 characters. I think that this can be covered with regex (if we are be able to use them with the solution, so its irrelevant if the solution cover it.</p>