Filter Shipping Method by Zip code with RegEx

On the custom shipping methods configuration it states:

Toggle ON to apply your shipping method to certain postal codes only. You’ll be able to filter postal codes with a regular expression.

…but I haven’t been able to find any clear documentation on implementing the zipcode regex. If someone could provide an example or at least point me in the right direction, i’d greatly appreciate it :slight_smile:

Our goal is to allow free local pickup but only within a couple zipcodes.

Hey @sobuckedup ,

Please take a look at this thread. We show an example on how to set a regular expression.

Regular expressions are pretty standard way to check if a string matches a pattern. There are very good tools online that could help you learn how it works. One of my personal favorite is Regex101.

Hope this helps!