Test, validate and match regular expressions
This PCRE regex matches hashtags that can optionally contain custom shortcut prefixes such as '->', '!->', or '!'. It allows word characters and apostrophes in the tag name and utilizes a negative lookahead to strictly ignore matches located within HTML tags or attributes. It is ideal for parsing user-generated text to extract tags without interfering with HTML markup.