human
Regular expression to remove line breaks
assistant
Here is some code to remove line breaks from string `textblock` using regex

re.sub('(?<=[a-z])\\r?\\n', ' ', textblock)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.