I am looking for a regex, which returns a string between two hashtags, but only if between the two # there is no whitespace.
My current regex: \#(.*?)\#
Testcase 1:
'#thisshouldbeparsed# #2 test'
=> thisshouldbeparsed (this is currently correct)
Testcase 2:
'test #2 #thisshouldbeparsed#'
=>2 (this is not correct)
I need a regex which is returning also "thisshouldbeparsed".