Remove all whitespace & combine regex

How to remove the whitespace from this

#This is a piece of text that should be without spaces

should become


My current attempt is this...


Which results in just the hashtag showing

Try: [ ]{1,}

4 posts were split to a new topic: How Do I use RegEx to Remove Substring From End of String?