Fork me on GitHub
Its the Code garbage collector. Mind dumps of daily coding antics from a frustrated silly little man. VBS, PHP, TCL, TK, PERL, C++, JAVA....what now? Ruby?
No Wait.. It should be just RUBY!

20070212 Regex

I was working on bring in my collection of bookmarks for use on There is still some work to be done on web interface, and most of the API apps that I used just didnt fit the bill so some quick regex helped with importation and exportation.

Main use for this was to enable sharing on all imported bookmarks.

So we need some regex for implementations on the api. can read and export Netscape bookmark files.

<meta equiv="Content-Type" content="text/html; charset=UTF-8">
</p><dt><a href="" last_visit="117002438" add_date="117002438" tags="wee,w00t">test test</a>

These can very easily be modified via regex to work as api calls
Example API calls test&tags=wee%20w00t&replace=yes&shared=yes

Regex Convertion for
(<dt><a href="*%29%28" tags=")(.*)(">)(.*)(</a></dt>)\2&description=\6&tags=\4&replace=yes&shared=yes

No comments: