While I agree that regex shouldn't be considered regular code, I think it might also not be a good idea to consider it a string for all the mentioned reasons (different semantics basically). Without actually looking at all the code and uses, I would still think we should rather special-case it as something that doesn't match string, comment nor code using those functions.