Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2004-06-15 04:59:08

> I'm having some difficulty getting my regular expression working.
> Basically, I need to make sure that a UK postcode is valid.
> The postcode that is passed to my function sometimes has extra things with
> it such as:

Have you looked at as it
seems to get a high rating.

> It now seems to be failing to find the postcode in the above examples.
> Also, when I pass my function a postcode that I know is invalid, such as
> 7L5 it matches it as G2 7L5 instead of failing to do the match.

Try prefixing with \< to insist that the match starts at a word boundary.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at