View Single Post
Old 08-20-2015, 12:02 PM   #1
slantybard
my parent's oops...
slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.
 
Posts: 492
Karma: 1477572
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->L2->iOS/CBW
Regex search and replace in bulk metadata help

I am trying to remove all html formatting from the comments in my library metadata so that when I make catalogs, the html span, div, font, stuff doesn't make the resulting catalog epub look messy.

I tried the "remove" formatting button individually, but that doesn't remove the html code from the comments section.

Then, after searching the forum, I found a pretty good, but not perfect solution, where using the S&R under the bulk metadata edit function, I used the search regex:
Code:
<[^<>]*>
and replaced it with nothing. This successfully removed 99% of the formatting html code littering my comments metadata. Unfortunately, the <br> tags were not removed and since these often show up in the comments metadata within sentences, the comments still get messed up. I have tried S&R with <br> and <\s*?[^>(br)]+\s*?>, but the <br> tags still show up.

My regex skills are not the best nor the worst, but I was wondering if anyone has any ideas that could help me remove the <br> tags in bulk?
slantybard is offline   Reply With Quote