Regex for Notepad++ to select everything but hashtags. Replace with nothing or space. Done!
hashtag extraction.
(?<!#)\b[^#]+
Selects all not-hashtagged stuff. Replace it with a space or nothing. Done!
hint: To keep separate lines:
FIRST: Replace ## with #
THEN: Replace \r\n with ##\r\n
THEN: Replace (?<!#)\b[^#]+ with nothing
THEN: Replace ##\r\n with \r\n
In my case, I needed to enclose them in <subject></subject>
So I continued this way:
Replace \r\n with </subject>\r\n
then replace: # with </subject><subject>
then replace: \r\n</subject> with \r\n
DONE!