2016-08-25 3 views
0

Zunächst ist dies die imacro Skript, das ich gemacht:Extract nur Stichwort/Link aus dem Quellcode angegeben REGEXP mit

VERSION BUILD=11.1.495.5175 
TAB T=1 
TAB CLOSEALLOTHERS 
SET !PLAYBACKDELAY 0.2 
SET !ERRORIGNORE YES 
SEARCH SOURCE=REGEXP:"(youtube. com/([^']+))" EXTRACT=$1 
SEARCH SOURCE=REGEXP:"(dailymotion. com/embed/video/([^']+)info=0)" EXTRACT=$1 
SET !CLIPBOARD {{!EXTRACT}} 

ich schaffte es irgendwie funktioniert, aber diesen Code ausgeführt wird, gibt mir Text von so etwas wie diese

<br> <a class="button red xLarge" 
href="//www.dailymotion. com/embed/video/sample29831" 
target="_blank"><span>DMOTION</span></a><br> <a class="button red 
xLarge" href="//www.dailymotion. com/embed/video/sample2d9sa" 
target="_blank"><span>DMOTION</span></a><br> <a class="button red 
xLarge" href="//www.youtube. com/sample3hjdaks" 
target="_blank"><span>youtube</span></a> 

, was ich tun möchte, ist nur sammeln:

dailymotion. com/embed/video/sample29831 
dailymotion. com/embed/video/sample2d9sa 
youtube. com/sample3hjdaks 

Wie kann ich dies mit REGE erreichen XP?

Antwort

0

Die folgende Regex wird wahrscheinlich arbeiten:

(?<=href="\/\/).*(?<=") 
+0

Dank, dass die Anzahl der Codes reduziert nicht notwendig das ist, ich habe eine Abhilfe davon bekam von Makro von Notepad ++ machen. – danny

+0

Allerdings, ist meine Antwort die richtige Antwort auf Ihre Frage, habe ich Ihre Frage falsch verstanden? –