fork download
  1. <?php
  2.  
  3. $str = '<s:Label x="10" y="10" text="NOME"/>
  4. <s:TextInput id="NOME" x="10" y="21" width="290" tabIndex="1"/>
  5. <s:Label x="10" y="50" text="TELEFONE"/>
  6. <s:Label x="120" y="50" text="RAMAL"/>
  7. <s:TextInput id="RAMAL" x="120" y="61" width="102" tabIndex="5"/>
  8. <s:Label x="365" y="50" text="LOGIN"/>
  9. <s:TextInput id="LOGIN1" x="365" y="61" width="102" tabIndex="7"/>
  10. <s:TextInput id="TELEFONE" x="10" y="61" width="102" tabIndex="4"/>
  11. <s:Label x="308" y="11" text="EMAIL"/>
  12. <s:TextInput id="EMAIL" x="308" y="22" width="290" tabIndex="2"/>
  13. <s:Label x="605" y="10" text="MATRICULA"/>
  14. <s:TextInput id="MATRICULA" x="606" y="22" width="144" tabIndex="3"/>
  15. <s:Label x="627" y="91" text="NASCIMENTO"/>
  16. <s:TextInput id="NASCIMENTO" x="627" y="103" width="121" tabIndex="14"/>';
  17.  
  18. preg_match_all('/id="(.+?)"/', $str, $matches);
  19. var_dump($matches[1]);
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
array(7) {
  [0]=>
  string(4) "NOME"
  [1]=>
  string(5) "RAMAL"
  [2]=>
  string(6) "LOGIN1"
  [3]=>
  string(8) "TELEFONE"
  [4]=>
  string(5) "EMAIL"
  [5]=>
  string(9) "MATRICULA"
  [6]=>
  string(10) "NASCIMENTO"
}