PHP => Comment puis-je rechercher à travers cette chaîne de telle sorte que quand j'ai class="font8text">N</span>'
pour me donner «EARLL» qui est dans le prochain <span>
.regexp pour trouver ce modèle
<div align="left" style=";">
<span style="width:15px; padding:1px; border:1pt solid #999999; background-color:#CCFFCC; text-align:center;" class="font8text">Y</span>
<span style="text-align:left; white-space:nowrap;" class="font8text">DINNIMAN</span>
</div>
<div align="left" style="background-color:#F8F8FF;">
<span style="width:15px; padding:1px; border:1pt solid #999999; background-color:#FFCCCC; text-align:center;" class="font8text">N</span>
<span style="text-align:left; white-space:nowrap;" class="font8text">EARLL</span>
</div>
Utilisez un analyseur HTML -> Trouver un élément avec la bonne classe et son contenu -> récupérer le contenu du prochain élément successif –
étrange, la question prétend être à propos de PHP, mais est étiqueté jquery à la place. Ça ne peut pas être les deux, n'est-ce pas? –
cochez cette case http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags –