Hi,
I need a regular expression to check that only alpha characters
are entered in a name field search and the wildcard character % Eg: %Joh%
Hi,
I need a regular expression to check that only alpha characters
are entered in a name field search and the wildcard character % Eg: %Joh%
isn't this just
see also: TutorialCode:[A-Za-z\%]+
P.S. Use PreparedStatement. I can almost guarantee that you think you need this because you are cobbling together sql statements from string values. Do not do that. Use PreparedStatement.
Edit: Besides "_" is also a valid wildcard in sql, and numbers are, of course, also valid. And the "word" characters are 0-9,a-z,A-Z, and "_", so simply "\\w".