You must be using something like \1 as the replace string. Why can't you put a space in the beginning?
What happens if you use the search string
<br>(?=\n.{0,20}<br>)
and leave the newline there? The reader should ignore newlines, converting them to spaces, which is what you seem to want.
|