parsing FireFox bookmarks using regular expression

Posted by SIFE on Stack Overflow See other posts from Stack Overflow or by SIFE
Published on 2012-10-30T22:56:03Z Indexed on 2012/10/30 23:00 UTC
Read the original article Hit count: 284

Filed under:
|
|
|

I tried to parse firefox bookmark(JSON exported version), using this efforts:

cat boo.json | grep '\"uri\"\:\"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}\"'
cat boo.json | grep '"uri"\:"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}'
cat boo.json | grep '"uri"\:"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}"'

And few others but all fails, json bookmarked file will look like this:

.........."uri":"http://www.google.com/?"......"uri":"http://stackoverflow.com/"

So, the output should be like this:

"uri":"http://www.google.com/?"
"uri":"http://stackoverflow.com/"

What is the missing part on my regular expression?

© Stack Overflow or respective owner

Related posts about JSON

Related posts about firefox