Thread: Regex help
View Single Post
Old 06-14-2012, 07:55 AM   #5
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 387
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by Serpentine View Post
Something I often find quite handy is to clean specific empty tags with a specific attribute (id, class etc).
Code:
<(p|h\d|div|a)\b[^<>]*?(id="blarg")[^<>]*?>([\s\n\r]|&(nb|en|em|thin)sp;|</?br\s*/?>)*</\1>
I cant remember why I use the extra \r\n; but there was a reason... might have just been old QtRegEx
Many thanks, Serpentine.

Another one for the collection.
paulfiera is offline   Reply With Quote