3 ms·I just do: .matches("[a-zA-Z0-9.\\-]+") And prepared statements or my own NoSQL.by bullen 6y agoI just do: .matches("[a-zA-Z0-9.\\-]+") And prepared statements or my own NoSQL.