jeudi 22 mars 2018

How to check for complete word in conditional regex statement?

Working with this text:

<li><a href="html/Inpatient/3,40060.html"> Informaci<font color="red">ó</font>n para los maestros y la escuela</a></li>

I need a conditional statement that basically says:

If the text ' font color="red" ' appears in the link, match ' html"> '.

I've been trying the following code:

(?(?=font color="red")html">)

But the selection ends up being broken up into pieces, and the match is not made. Any ideas?

Example

Aucun commentaire:

Enregistrer un commentaire