Hi.
I use custom buttons Firefox extension on my daily work.
Due to Firefox updates, that extension became obsolete and is being refused by newer versions of the browser.
It uses a XUL format file to store the URLs.
I'd like to capture just my bookmarked URLs from it.
Regular expressions seems to be the best solution, because such file became a little big.
I tried many variations to grab URL's strings after "loadURI" key without success.
Here is a piece of file I'm trying to extract only URLs:
So, the output I wish is something like this:
Regular expression has to dismiss everything before loadURI(" (included itself) and everything after ")" cb-init (included).
And send to output everything between them.
I use custom buttons Firefox extension on my daily work.
Due to Firefox updates, that extension became obsolete and is being refused by newer versions of the browser.
It uses a XUL format file to store the URLs.
I'd like to capture just my bookmarked URLs from it.
Regular expressions seems to be the best solution, because such file became a little big.
I tried many variations to grab URL's strings after "loadURI" key without success.
Here is a piece of file I'm trying to extract only URLs:
Code: Select all
<overlay id="custombuttons-profile-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="custombuttons-button0" label="Google" tooltiptext="Google" class="toolbarbutton-1 chromeclass-toolbar-additional" context="custombuttons-contextpopup" image="file:///B:/Meus%20documentos/Firefox/%C3%8Dcones/google3-20x20.jpg" cb-oncommand="loadURI("http://www.google.com")" cb-init="/*Código de inicialização*/" cb-mode="0"/>
<toolbarbutton id="custombuttons-button5" label="FreeDictionary" tooltiptext="FreeDictionary" class="toolbarbutton-1 chromeclass-toolbar-additional" context="custombuttons-contextpopup" image="file:///B:/Meus%20documentos/Firefox/%C3%8Dcones/Dictionary-36x20.jpg" cb-oncommand="/*CÓDIGO*/
loadURI("http://www.thefreedictionary.com")" cb-init="/*Código de inicialização*/" cb-mode="0"/>
<toolbarbutton id="custombuttons-button10" label="SpeedTest" tooltiptext="SpeedTest" class="toolbarbutton-1 chromeclass-toolbar-additional" context="custombuttons-contextpopup" image="file:///B:/Meus%20documentos/Firefox/%C3%8Dcones/SpeedTest-20x20.jpg" cb-oncommand="/*CÓDIGO*/
loadURI("http://www.speedtest.net/")" cb-init="/*Código de inicialização*/" cb-mode="0"/>
<toolbarbutton id="custombuttons-button11" label="SuaLíngua" tooltiptext="SuaLíngua" class="toolbarbutton-1 chromeclass-toolbar-additional" context="custombuttons-contextpopup" image="file:///B:/Meus%20documentos/Firefox/%C3%8Dcones/SuaL%C3%ADngua-16x20.jpg" cb-oncommand="/*CÓDIGO*/
loadURI("http://wp.clicrbs.com.br/sualingua/")" cb-init="/*Código de inicialização*/" cb-mode="0"/>
<toolbarbutton id="custombuttons-button14" label="Modem" tooltiptext="Modem" class="toolbarbutton-1 chromeclass-toolbar-additional" context="custombuttons-contextpopup" image="file:///B:/Meus%20documentos/Firefox/%C3%8Dcones/M-20x20.jpg" cb-oncommand="/*CÓDIGO*/
loadURI("http://192.168.100.1/")" cb-init="/*Código de inicialização*/" cb-mode="0"/>
</toolbarpalette>
<toolbarpalette id="MailToolbarPalette"/>
<toolbarpalette id="MsgComposeToolbarPalette"/>
<toolbarpalette id="calendarToolbarPalette"/>
<toolbarpalette id="NvuToolbarPalette"/>
</overlay>
Code: Select all
http://www.google.com
http://www.thefreedictionary.com
http://www.speedtest.net/
http://wp.clicrbs.com.br/sualingua/
http://192.168.100.1/
And send to output everything between them.