I’m trying to merge a hyphenated word in pythog. For example I have:
bla bla bla infor-
mation bla bla bla
I want to end up with blabla information bla bla bla.
I can match up the hyphen, remove the newline, all that stuff is easy, but I can’t seem to get the two parts to join. The closes I got was bla bla bla infor mation bla bla, but obviously I can not match on a space without removing all other spaces.
Any help would be greatly appreciated.
Why would you ever use regex for such a simple task?