<p>Any regular expression can be linked to a DFA - you can minimize the DFA and since the minimal form is unique, you can decide whether two expressions are equivalent. Dani Cricco pointed out the Hopcroft O(n log n) algorithm. There is another improved algorithm by Hopcroft and Craft which tests the equivalence of two DFAs in O(n).</p>

<p>For a good survey on the matter and an interesting approach to this, I reccomend the paper <a href="http://arxiv.org/pdf/0907.5058" rel="noreferrer">Testing the Equivalence of Regular Languages</a>, from arXiv.</p>

<p>Later edit: if you are interested in inclusion rather than equivalence for regular expressions, I have come across a paper that might be of interest: <a href="http://www.ii.uib.no/~dagh/reinclusionBORA.pdf" rel="noreferrer">Inclusion Problem for Regular Expressions</a> - I have only skimmed through it but it seems to contain a polynomial time algorithm to the problem.</p>
Does an algorithm exist which can determine whether one regular language matches any input another regular language matches?
<p>Let's say we have regular expressions:</p>

<ul>
<li>Hello W.*rld</li>
<li>Hello World</li>
<li>.* World</li>
<li>.* W.*</li>
</ul>

<p>I would like to minimize the number of regexes required to match arbitrary input.</p>

<p>To do that, I need to find if one regular expression matches any input matched by another expression. Is that possible?</p>

<p>Billy3</p>