Script to parse bookmarks file

I am using Internet Explorer v10 at work and regularly need to import my personal Firefox bookmarks over. Long story short, I have found the import falling over on any bookmark elements which are over 256 characters.

The bookmark file contains bookmarks of this format:

<DT><A HREF="http://www.lasoo.com.au/" ADD_DATE="1394006093" LAST_MODIFIED="1394006093">bookmark text is here</A>

If the text from HREF onwards, up to but not including the �<� of the �</A>� is great than 255 characters then the import fails.

Can anyone suggest a script which can identify the offending lines so I can manually edit them?

awk 'length($0) > 255' file

Unfortunately not that simple.

Many lines are over that length. It's only text between the elements I described. Which may go over multiple lines as well.

Can you please elaborate...Is it the length of

http://www.lasoo.com.au/" ADD_DATE="1394006093

or

="http://www.lasoo.com.au/" ADD_DATE="1394006093" LAST_MODIFIED="1394006093">bookmark text is here

As I said, it's from and includes the HREF:

HREF="http://www.lasoo.com.au/" ADD_DATE="1394006093" LAST_MODIFIED="1394006093">bookmark text is here