title: Can Java String.indexOf() handle a regular expression as a parameter?
body: <p>I want to capture the index of a particular regular expression in a Java String.  That String may be enclosed with single quote or double quotes (sometimes no quotes). How can I capture that index using Java?</p>
  
  <p>eg:</p>
  
  <pre><code>capture String --&gt;  class = ('|"|)word('|"|)
  </code></pre>