Click here to Skip to main content
15,914,010 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
I need a regular expression that accepts different inputs like

Ex:CSHForest.com\user
EX:2008-demo\rms
Ex:domain.com\ship_123

I have tried with ^[a-zA-Z0-9_.-\]*$
but it's not suitable,plz suggest me any one.

thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 3-Jul-15 0:26am    
You did not really specify what you want to achieve. You need to understand: samples don't define anything, they can only illustrate strict and formal definition. You regular expression also cannot define anything, because it doesn't work for you. This way, the question makes no sense at all.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900