Ich habe meine String etwas wie folgt aus:Java regex Extrakt Text
<center>
<a href="https://ec-media.sndcdn.com/fLwbjgKwn7Sl.128.mp3?f10880d3e4" class="expanded button" style="max-width:220px;" download>Download Track 2.9MB</a>
<a href="https://chrome.google.com/" class="expanded button hide-for-small-only" style="max-width:220px;" >Add to Chrome</a>
<a href="/" ><b><i>Download Another Track</i></b></a>
<br /><br class="show-for-medium"/>
</center>
Und ich möchte die URL innerhalb href extrahieren, aber es sollte .mp3 ENTHALTEN.
Ich bin mit diesem regex: href = \ "([^ \"] *) \“ aber es kann nicht erkennen, ob es
contains.mp3 Wie kann ich die https://ec-media.sndcdn.com/fLwbjgKwn7Sl.128.mp3?f10880d3e4
extrahiere ich will? extrahieren es .mp3 erhalten dann die ganze uRL durch die Suche
Sie sollten –
@ SebastianProske: Klar, danke, behoben. –