Vim: Converting HTML List items to OPML
I was trying to convert a long list of html items to an OPML file. The regex refused to work, and after a quick chat with the nice people in #vim, it turns out that I wasn’t escaping my parenthesis.
:%s/<li><a href="\(.*\)">\(.*\)< \/a><\/li>/<outline text="\2" url="\1">/
I found the escaping a bit counter-intuative… like the rest of vim is so intuative ![]()



October 11th, 2005 at 2:09 am
yeah, i dislike having to escape my greedy plus signs \(.\+\) too. however, it starts to kinda-sorta make sense when you consider whether or not you would *usually* be actually looking for literal parantheses or plus signs when using search in a text editor such as vim.
i wish there was a choice. oh wait, it’s vim. there probably is. i can’t be bothered to find out how to change it though.
August 2nd, 2006 at 2:57 pm
There IS a choice and I use it all the time: just put \v (”very magic”) at the beginning of the regex and you won’t have to worry about escape parentheses, pipes or curly braces (unless you want them as literal characters).
July 26th, 2007 at 9:55 pm
free porn video…
exellent…
February 21st, 2008 at 9:22 pm
updatedfreeporn.com’s multi award winning adult site offers daily & weekly updated free porn for every niche & desire.free porn pics,free porn videos,free …