hopefully someone can help me.
I'm new to regexp...
I'm creating a commerce website for a local florists. They offer free postage within the local area (postcodes CM11 and CM12), and i'm looking to create fixed prices for further distances up to a 15 mile radius (they don't deliver outside 15 miles).
Shipping quote 1
Shipping quote 2
The issue / question I have is how to hide the 'local delivery' option from appearing when the user enters a CM11 or CM12 postcode. They should only see free delivery or collect in store (not the third option of local delivery)
You can see on my site (if you add something the cart and follow the checkout process, experiment with the postcode and see the delivery options change) - http://techyhelp.uk/florist/catalog/5
use a negative lookahead in your "local delivery" regex to filter out "cm12" and "cm11":
^(?!cm1[12]$)(cm[1-5]|cm1[3-7]|cm99|ig[2-3]|ig[6-7]|me3|rm[1-9]|rm1[0-9]|rm20|ss0|ss1[1-7]|ss2|ss22|ss[4-9]|ss99)$