in reply to Replace leading Spaces after a tag

s/<br>\K( +)/"&nbsp;" x length($1)/eg;