Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: dhrobertsonHi there,
I'm trying to evaluate some post codes in a if statement but it is not behaving as I would expect...
I have a bunch of post codes in formats starting like RH10, R50, EG3
my if statement is like this:
if(regexIsMatchI(Postcode,"\\w\\w\\d\\d") or regexIsMatchI(Postcode,"\\w\\w\\d") or regexIsMatchI(Postcode,"\\w\\d\\d")) then
{
do something
}
on the most part, codes that follow this format work fine and run the true part of the if statement, however, I'm getting some postcodes with only numbers running the true part of the code as well? as an example I have a post code 1111 and I want it to run the false part of the if statement as it does not meet the criteria in the if statement. I tried playing around with \\d\\d\\d\\d and other variations just to see if I can get these outlier postcodes to evaluate correctly but am struggling...
any ideas? is there s listing somewhere or all the various pattern wildcards? ie. I'm assuming in my example \\w\\w\\d equates to letter followed by letter followed by number.... or at least that is how it seems to be working... are there other options that can be used with regexIsMatch? there is no information anywhere in help or forums about this.
thanks
douglas