title: How to compare items in an array to those in a database column using regular expressions?
body: <p>I'm trying to take a list of elements in an array like this:</p>
  
  <pre><code>['GRADE', 'GRATE', 'GRAPE', /*About 1000 other entries here ...*/ ]
  </code></pre>
  
  <p>and match them to their occurrences in a column in an Oracle database full of entries like this:</p>
  
  <pre><code>1|'ANTERIOR'
  2|'ANTEROGRADE'
  3|'INGRATE'
  4|'RETROGRADE'
  5|'REIGN'
  ...|...
  /*About 1,000,000 other entries here*/
  </code></pre>
  
  <p>For each entry in that array of G words, I'd like to loop through the word column of the Oracle database and try to find the right-sided matches for each entry in the array. In this example, entries 2, 3, and 4 in the database would all match.</p>
  
  <p>In any other programming language, it would look something like this:</p>
  
  <pre><code>for entry in array:
    for each in column:
      if entry.right_match(each):
        print entry
  </code></pre>
  
  <p>How do I do this in PL/SQL?</p>