Regex pattern now skips non-identifiers.