regex and trimming updates for danbooru and lite themes