C# Regex Alpahnumeric String

I'd like to check whether a string contains the following Groups. All Strings MUST contain exactly 2 ##

String 1)

##Some_Foo_Text_1##

=> Expected result: String contains 1 Valid group

String 2)

##Some_Foo_Text_2#E+1##

=> Expected result: String contains 1 Valid group

String 3)

##Some_Foo_Text_3#e-1##

=> Expected result: String contains 1 Valid Group

String 4)

##Some_Foo_Text_4##E+1##

=>Expected result: String contains 1 valid Group (##Some_Foo_Text_4##) and 1 invalid Group (E+1##) the invalid Group is discarded

Now i came up with this regex

/([A-Za-z\+\-0-9])+/g

According to Regexr this does not match my string. Could you help me to take care of the ## at the beginning and End?

#c-sharp #regex

1 Likes1.60 GEEK