Can String.indexOf() handle a regular expression as a parameter?
<p>I want to capture the index of a particular String in the input. 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>
