Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Regex Suche

Empfohlene Antworten

Veröffentlicht

Hallo Boardies,

hoffentlich passt mein Thread einigermasen in diesen Bereich.

Ich benötige Hilfe mit einer Regular Expression (Regex), die mir beim Suchen gewissen Stichwörter in einem HTML Dokument helfen soll.

So sieht das immer wiederkehrende Muster des HTML Codes aus:


<tr>

  <td width="170px">

	  <img src="imgsource" />

	</td>

  <td>

	  <strong>[B]WICHTIG[/B]</strong><br />

		[B]WICHTIG[/B]<br />

		[B]WICHTIG[/B]<br />

		[B]WICHTIG[/B]<br />

		<a href="URL" target="_blank">Text</a><br />

		<br />


  </td>

</tr>

<tr>

  <td colspan="2" style="border-bottom: 1px solid #ccc;"></td>

</tr>

Alles was als WICHTIG betitelt ist möchte ich herauspicken.

Man könnte also sagen, alles zwischen <strong> und <a href=".

Ich habe mir bereits ein Regex zusammengeschustert, das Text zwischen zwei HTML-Tags findet, jedoch nicht über mehrere Zeilen wie es im obigen HTML-Code ist.

(?<=<strong>).*?(?=</strong><br />)

Dieser Regex findet z.B. alles zwischen <strong> und </strong><br />, jedoch habe ich es nicht geschafft, dass er alles zwischen zwei Tags, welche nicht in der selben Zeile sind findet.

Kann mir kemand von euch weiterhelfen?

Was mache ich falsch?

Vielen Dank.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.