I need a regular expression pattern to check a string for alphanumeric(a-zA-z0-9) and also can contain underscore, hypen and dot this will be a file name so i dont want othe
Check out "Character Classes" in the docs. Basically, [a-zA-Z0-9_\-\.]+ should do it. If you put that in a string, be sure to escape the backslashes.
[a-zA-Z0-9_\-\.]+