As far as real copy/paste examples, I was using that regex on personal journal entries with various hashtags ending each entry. For some entries, I just wanted to delete all the hashtags (they were social media hashtags, and not my file sorting hashtags). I wanted to use the regex to hop to each hashtag, and then be able to Select Next to be able to select all the successive hashtags appended to an entry, so I could delete them.
See were woven into the text, so not collated at the end of the entry.
Bike ride to grocery store. #bicycle #shopping #groceries
#photoshop #tutorial on key object selection alignment. #software
I was using the regex to jump to instances of hashtags, so I could evaluate them. I wanted to then use the Select Next to highlight the tags I wanted to delete.
In the above example, I would want to use the regex/“Select Next” combo to highlight then delete the three hashtags
#photoshop #software #tutorial
Regarding the regex pattern, the word break indeed seemed redundant, but if I recall correctly I was unable to get my regex to match hashtags properly without it; I use underscores in many hashtags, which at least on macOS and iOS are seen as part of the word string. But Atom’s regex wasn’t doing something I needed without inclusion of that ending word break meta character.
I’m new to regex so I may be doing something inelegant.