bravo14 Posted January 16, 2012 Share Posted January 16, 2012 Hi I have a regex that currently only allows uppercase $.validationEngineLanguage.allRules["postcodeUK"] = { // UK zip codes "regex": /^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$/, "alertText": "* Invalid postcode" }; How do I change this to allow lowercase as well? Quote Link to comment https://forums.phpfreaks.com/topic/255151-allow-upper-and-lowercase/ Share on other sites More sharing options...
Adam Posted January 16, 2012 Share Posted January 16, 2012 Use the 'i' modifier after the closing delimiter: [...]{2}|GIR 0AA)$/i, Quote Link to comment https://forums.phpfreaks.com/topic/255151-allow-upper-and-lowercase/#findComment-1308251 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.