Link to home
Start Free TrialLog in
Avatar of akkinenik
akkinenik

asked on

regular expression for numbers alphabets and space



I need a regular expression which allows only numbers alpabets and space


Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

"^[0-9a-zA-Z ]$"

Avatar of akkinenik
akkinenik

ASKER

i need a regular expression to validate textbox to allow only alphabets numbers  and space like

Air India
Air123 Space
and this is for .net
Hi Dude,

You can try this,

Dim RegexObj as Regex = New Regex("^\[0-9a-zA-Z ]*$")
Dim val
val = "Freinkes  9y"
RegexObj.IsMatch(val)

This will return true if your string has only alphabets,digits,spaces.
ASKER CERTIFIED SOLUTION
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial