I slightly modified your regex to get what you need.
var p = "I need to match only words like #these. Ignore the ones like @#this , !#this and in#ignore." [^@!az$]\#[az]+
This will only match #these, you can exclude anything you don't need by adding between the first square bracket
source share