regulären Ausdruck für html-tags mit bestimmten Attributen

Ich bin versucht, alle HTML-tags nicht über das Attribut "Bezeichnung" oder "Reihe"

hier ist Beispiel-HTML-format

<span class="inline prewrap strong">DATE:</span>    12/01/10
<span class="inline prewrap strong">MR:</span>  1234567
<span class="inline prewrap strong">DOB:</span> 12/01/65
<span class="inline prewrap strong">HISTORY OF PRESENT ILLNESS:</span>  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum

<span class="inline prewrap strong">MEDICATIONS:</span>  <span term="Advil" range="true">Advil </span>and Ibuprofen.

Meine regex ist: <(.*?)((?!\bterm\b).)>

Leider passt alle tags...Es wäre schön, wenn der innere text wäre nicht abgestimmt, wie ich brauche, heraus zu filtern, werden alle tags außer denen mit, dass bestimmtes Attribut.

Können Sie erläutern, ein wenig mehr über das, was Sie zu tun versuchen? Sind Sie versuchen, um herauszufiltern, alle tags, die habe ein "Begriff" oder eine "range" - Attribut oder alle die tags ohne ein "Begriff" oder eine "range" - Attribut?
ich versuche heraus zu filtern, werden alle tags, die NICHT mit "Begriff" und "range" - Attribut. Im Grunde, nachdem ich ein replace() nur die tags, die Attribute sollten immer noch da sein.

InformationsquelleAutor user253530 | 2012-01-25

Schreibe einen Kommentar