First, sorry for my English, it not good.
I have Table as below.
 <table>
  <tr class="_in" id="1">
    <td>content</td>
    <td>content
         <h1>content h1</h1>
    </td>
  </tr>
  <tr class="_in" id="2">
    <td>content</td>
    <td>content
        <table>
            <tr>
                <td>content</td>
            </tr>
        </table>
    <h2>content h2</h2>
    </td>
  </tr>
  <tr class="_in" id="3">
    <td>content</td>
    <td>
            <table>
              <tr>
                <td>content</td>
              </tr>
            </table>
            <h3>content h3</h3>
    </td>   
  </tr>
  <tr class="_in" id="4">
    <td>content</td>
    <td>content
        <h1>content h3</h1>
    </td>
  </tr>
  <tr class="_in" id="5">
    <td>content</td>
    <td>content
        <h1>content h1</h1>
    </td>
  </tr>
</table>
As you see, i want use regular expression to get tr has class="_in", but in tr have another table and in that table have another tr tag. beside that, tr has class="_in" end with many way.
as you can see it can end with </h1></td></tr> or </h2></td></tr> or </h3></td></tr>
My solution is use or operator but don't have result, below are my code
$html=file_get_contents("vnair3.txt");
$parten='/<tr\sclass=\"_in\"[^>]*>.*(?:<\/h1>|<\/h2>|<\/h3>)\s+<\/td>\s+<\/tr>/isU';
preg_match_all($parten,$html,$output);
print_r($output);
Please help me get each tr tag has class="_in" to each element in ouput array. i use php. Thanks all