Fixed regexerrors on hash signs, using better delimiter and escapes it