
Ich versuche das jetzt seit einer Stunde und kann einfach nicht den richtigen regulären Ausdruck finden. Irgendwelche Ideen?
Das:
src="https://www.mywebsite.com/embedframe/84398934/need-this-text-and-the-forward-slash-before-it-removed" frameborder="0" width="600" height="400" scrolling="no" allowfullscreen="allowfullscreen">
Hierzu:
src="https://www.mywebsite.com/embedframe/84398934" frameborder="0" width="600" height="400" scrolling="no" allowfullscreen="allowfullscreen">
Antwort1
Verwenden von Notepad++ (Notepad unterstützt keine regulären Ausdrücke):
- Ctrl+H
- Finde was:
src="https://.*\K/[^/"]+(?=")
- Ersetzen mit:
LEAVE EMPTY
- check Umwickeln
- check Regulärer Ausdruck
- Replace all
Erläuterung:
src="https:// # literally
.* # 0 or more any character
\K # forget all we have seen until this position
/ # a slash
[^/"]+ # 1 or more any character that is not slash or double quote
(?=") # positive lookahead, make sure we have a double quote after
Ergebnis für gegebenes Beispiel:
src="https://www.mywebsite.com/embedframe/84398934" frameborder="0" width="600" height="400" scrolling="no" allowfullscreen="allowfullscreen">
Bildschirmaufnahme: