I want to make sure a user only enters alphanumeric values, _ or - into a text field, I've coded the below code but it's leaving some special characters through e.g * or ", can anyone shed some light on why these are allowed through?
//Make sure text only has alphanumeric values or "_" and "-".
if(TextField.getText().trim().matches("[^a-z ^A-Z ^0-9 ^_ ^-]"))
//popup and error message
Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.