RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[a-zA-Z0-9_\s-]+$
Description
This tests an input string for only a-z and A-Z and only allows underscores, hyphens and spaces. The purpose is to force users to generate legitimate, readable file names that can be streamed from the web.
Matches
123Testing | 123_Testing | 123-Testing This
Non-Matches
!@#Testing | Testing "This" | Don't Forget to Write
Author Rating: The rating for this expression. Paul Fox
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: __
Name: Jon
Date: 1/4/2005 9:37:09 AM
Comment:
"__" is also matched, but it is not valid name


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials