Regex in VB6

Associate
Joined
25 Oct 2007
Posts
342
Location
Southampton
Hello all,
I'm currently trying to make a regex expression, which will be implemented in VB6, to test for a home address, in the following format:
House Name/Number,
Street,
Town/City,
County,
Postcode.

Now currently i've come up with
Code:
^([A-Za-z\d\s]+\,?\r){4}[A-Za-z]{1,2}[\d]{1,2}\s?[\d]{1}[A-Za-z]{2}
which according to this Regex tester should work - however, when using this code in Visual Basic it doesn't return a match. Can anybody shed some light on what's going on?
 
I can't help with the regex, but I find it's much easier when asking for address input to provide 5 textboxes, where only the first line and postcode must have values.

It's a lot easier to regex check a postcode than a whole address.
 
Back
Top Bottom