regex - Regular expression for street address? -


this question has answer here:

i need regular expression street address example:

test 123 - valid 123 test -not valid  

so need letters(required) space , number(required) tried without success

@"^[a-za-z ][0-9 ]" 

you need include quantifiers, anchors.

@"^[a-za-z]+ [0-9]+$" 

+ repeats previous token 1 or more times.

you may use if space optional.

@"^[a-za-z]+ ?[0-9]+$" 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -