Click here to Skip to main content
14,872,699 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i need a regex to validate the Person Home address that includs all alphanumeric and special characters with a limit of 1 - 150.
House # 20-H, Street # 10, F-8/3 Islamabad.
Ph: +92-51-2852662 (Exchange)
Fax : +92-51-2852663

I have tried this, but it is not it only accpet characters,
Updated 11-May-14 9:13am
CHill60 11-May-14 17:03pm
Why use a regex? Sounds like all you have to do is limit the length to 1 to 150
Muhammad Taqi Hassan Bukhari 11-May-14 18:42pm
i have to do both
syed shanu 11-May-14 20:52pm
Chk this Link :

1 solution

If you insist on Regex, try this:

Remember to trim the string from leading and trailing space before matching.

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