title: Finding a string in a source code of a webpage
body: <p>I am sorry in advance, I have almost no experience with programming so this is going to be a very basic, almost absurd, question, but the answer would save me a lot of time as I wouldn't have to do a very routine work. I would appreciate so much somebody's help!</p>
  
  <p><strong>I would like to know how to find in a source code of a webpage a certain string.</strong></p>
  
  <p>I am using a javascript code I found on the internet to help me with my studies of Portuguese. When I am learning a new word, I use the script to open multiple webpages (dictionary, webpage with pronunciation, etc.). Simplified version looks like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
    &lt;head&gt;&lt;/head&gt;
  
    &lt;body style="background-color:grey"&gt;
      &lt;p&gt;What Portuguese word would you like to multisearch? Type below, then press enter please.&lt;/p&gt;
      &lt;input type="text" id="boxu" autofocus&gt;
      &lt;script&gt;
        document.getElementById("boxu").onkeydown = function(e) {
          searchy(e)
        };
  
        function searchy(e) {
          if (e.which == 13) {
            var q = document.getElementById("boxu").value;
            window.open("https://www.collinsdictionary.com/dictionary/portuguese-english/" + q);
            window.open("http://www.linguee.com/portuguese-english/translation/" + q + ".html");
            document.getElementById("boxu").value = "";
          }
        }
  
      &lt;/script&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>What I am trying to do: I would like to open in another tab (or directly download) audio file with the pronunciation of a given word. collinsdictionary.com have the pronunciation recorded on their website. Let's say I am doing a search for Portuguese word "cotovelo" (elbow). If I search in the source code of <a href="https://www.collinsdictionary.com/dictionary/portuguese-english/cotovelo" rel="nofollow noreferrer">https://www.collinsdictionary.com/dictionary/portuguese-english/cotovelo</a> for "<a href="https://www.collinsdictionary.com/sounds/p/pt_/pt_br/pt_br_w" rel="nofollow noreferrer">https://www.collinsdictionary.com/sounds/p/pt_/pt_br/pt_br_w</a>", right after this string follows 7 digits I am looking for. In this case "0028290". The link for the audio file is "<a href="https://www.collinsdictionary.com/sounds/p/pt_/pt_br/pt_br_w0028290.mp3" rel="nofollow noreferrer">https://www.collinsdictionary.com/sounds/p/pt_/pt_br/pt_br_w0028290.mp3</a>".</p>
  
  <p>The process is the same for every word I am looking for, I would like to write a script which automatizes this task of opening the source code, searching for the string of 7 digits, and opening the link in a new window. I was trying to search for the answer online and to write the code myself, but it's difficult without almost any programming knowledge.</p>
  
  <p>Thank you very much for the answer!</p>