Test, validate and match regular expressions
This regex matches text wrapped in hash symbols (like #text#) while explicitly avoiding content located inside HTML or XML tags. It uses multiple negative lookaheads to ensure the matched segments do not cross markup boundaries, preventing accidental matches within `<` and `>` brackets. It is highly useful for parsing custom markdown-like syntax or extracting specific tagged content from strings that also contain HTML.