I've already tried a couple of regex but cannot fix this one:
I need an enter line before the hashtags start (so there is some space).
Example:
It's essential to keep your pup cool in the summer months! Try to keep them out of the heat as much as possible - keep the house cool, provide shade and run a fan for them if you can. #Dogs #Animals #Summer #DogCare #Humidity #HeatStroke #Cooling #HeatExhaustion #StayCool #HealthyPups
Should be:
It's essential to keep your pup cool in the summer months! Try to keep them out of the heat as much as possible - keep the house cool, provide shade and run a fan for them if you can.
#Dogs #Animals #Summer #DogCare #Humidity #HeatStroke #Cooling #HeatExhaustion #StayCool #HealthyPups
If there is a hashtag in the text it should not add whitespace, for example (note hashtags in text!):
It's essential to keep your pup cool in the summer months! Try to keep them out of the heat as much as #possible - keep the house cool, #provide shade and run a #fan for them if #you can. #Dogs #Animals #Summer #DogCare #Humidity #HeatStroke #Cooling #HeatExhaustion #StayCool #HealthyPups
How can I solve this with Regex and PHP?