Skip to content

Instantly share code, notes, and snippets.

@pjlsergeant
Last active June 2, 2016 05:24
Show Gist options
  • Save pjlsergeant/fb33fe3bd15cf02865b582c2b1350670 to your computer and use it in GitHub Desktop.
Save pjlsergeant/fb33fe3bd15cf02865b582c2b1350670 to your computer and use it in GitHub Desktop.
Perl RE Australian Postcodes
/(?:3(?:7(?:5[0-9]|6[0-7]|2[02-8]|3[0235-9]|1[1-5789]|8[1235-9]|0[0145789]|9[1235679]|4[014679]|7[05789])|5(?:5[0124-9]|8[013-689]|6[1-8]|7[0-3569]|2[0-3579]|0[0125679]|9[014-79]|4[02469]|1[25-8]|3[0137])|3(?:5[0-7]|3[0-578]|1[01245789]|7[01345789]|0[0-59]|2[1-589]|9[0-356]|8[014578]|4[0125]|6[0134])|8(?:5[0-46-9]|0[02-9]|9[0-3568]|1[02-68]|8[025-9]|2[0-5]|7[013458]|4[01247]|6[02459]|3[1235])|0(?:[245][0-9]|6[0-8]|7[0-689]|3[0-46-9]|1[0-35689]|9[013-79]|8[1-5789]|0[0-468])|6(?:3[0-9]|6[0-69]|7[0-35-8]|4[0134679]|9[0145789]|1[0246-9]|2[0-49]|8[235789]|0[78]|5[89])|4(?:6[0-5789]|3[0-578]|4[0124678]|8[0235789]|2[034789]|1[2-589]|0[01279]|9[01468]|5[0138]|7[2578])|2(?:[37][0-9]|2[0-8]|8[0-79]|1[1-9]|0[0124-7]|6[04-9]|4[0-39]|5[014]|9[234])|9(?:2[0-35-9]|1[0-35689]|[35][01346-9]|4[0-6]|6[024-7]|7[15-9]|9[01256]|8[01478]|0[02349])|1(?:[346-9][0-9]|5[0-689]|[02][1-9]|1[13-6]))|2(?:7(?:3[0-9]|9[0-5789]|5[0-46-9]|6[0-35-9]|1[0-7]|0[0-35-8]|7[03-9]|2[0125679]|8[02-7]|4[5789])|3(?:[25][0-9]|4[0-8]|1[0124-9]|0[02-9]|3[03-9]|8[012678]|9[05-9]|7[0129]|6[0159])|8(?:2[0-9]|3[0-689]|7[013-9]|4[02-9]|0[03-9]|6[4-9]|1[078]|9[089]|5[02]|80)|5(?:7[0-9]|8[0-8]|[36][03-9]|5[015-9]|2[025-9]|4[015689]|0[02568]|1[5-9]|9[04])|2(?:[29][0-9]|8[0-79]|1[0-46-9]|0[03-9]|6[0-57]|5[016-9]|3[0-4]|78)|4(?:[278][0-9]|0[0-689]|4[013-9]|6[02-69]|5[02-6]|1[015]|3[019]|90)|0(?:[23468][0-9]|7[0-79]|0[01246-9]|1[0125-9]|9[02-79]|5[0279])|6(?:[024][0-9]|1[0124-9]|5[0-35689]|6[0135689]|3[0-3]|7[1258]|8[01])|1(?:[012579][0-9]|[346][0-8])|9(?:0[0-6]|1[1-4]))|6(?:3(?:9[0-8]|5[0-35-9]|2[0-4678]|3[0-35-8]|1[1235-8]|6[135789]|0[24689]|7[0235]|4[1368]|8[3-6])|9(?:1[0-9]|6[013-9]|[58][1-9]|2[0-69]|0[1-79]|4[1-7]|3[1-69]|9[0127]|7[09])|4(?:2[0-9]|1[0-589]|3[0-4678]|6[0-35-8]|4[0235-8]|7[0235679]|8[045789]|0[13579]|5[02]|90)|2(?:2[013-9]|3[0-3679]|8[0124568]|5[1-68]|1[013458]|4[034]|0[789]|6[02]|7[15]|90)|0(?:[256][0-9]|3[0-8]|7[0-46-9]|1[0124-9]|0[013-9]|[48][1-4]|90)|5(?:1[0-9]|0[1-79]|6[0246-9]|3[012567]|7[1245]|2[1258]|5[68])|7(?:1[0-468]|2[012568]|5[1348]|6[025]|0[157]|4[03]|3[13]|9[89]|70)|1(?:[056][0-9]|7[0-6]|2[1-6]|[18][012]|4[789])|6(?:3[012589]|2[03578]|0[35689]|1[2346]|4[026])|8(?:4[0-9]|3[1789]|50|[79]2|65))|4(?:8(?:[17][0-9]|8[0-8]|0[02-9]|2[0-589]|5[024-9]|6[01589]|9[0125]|30|49)|3(?:7[0-8]|5[02-9]|4[0-7]|8[0-578]|0[013-79]|6[0-5]|1[0-3]|90)|7(?:1[0-9]|2[0-8]|0[0-79]|3[0-35-9]|4[0-6]|5[013467]|9[89])|0(?:0[0-9]|1[0-4789]|6[014-9]|7[02-8]|3[0124-7]|2[01259]|5[13459])|4(?:[02][0-8]|1[0-35-9]|9[0-4678]|7[01245789]|8[0126-9]|6[12578]|5[45])|1(?:1[0-9]|2[0-5789]|[05][1-9]|7[0-489]|6[013459]|3[0-3]|8[34])|6(?:7[0134678]|1[0-5]|2[01567]|0[01568]|9[4579]|5[059]|6[02]|[38]0)|5(?:[056][0-9]|1[0124-9]|7[0-5]|[28][01])|2(?:[12][0-9]|7[0125]|0[5789]|8[057]|30))|5(?:0(?:[14][0-9]|9[0-8]|[68][1-9]|3[1-5789]|7[0-6]|2[0-5]|0[016-9]|5[012])|2(?:6[0-9]|7[0-35-9]|5[0-69]|3[1-8]|4[0-5]|1[0-4]|2[0-3]|0[1-4]|9[01]|80)|4(?:1[0-9]|8[0-35]|5[1-5]|7[0-3]|6[0124]|9[0135]|3[1-4]|2[012]|0[01]|40)|1(?:[56][0-9]|1[0-8]|3[1-46-9]|7[0-4]|2[01567]|4[0124]|0[6-9])|3(?:5[0-7]|0[1-46-9]|4[0-6]|3[0-3]|7[1-4]|2[012]|1[01]|60|81)|6(?:0[0-9]|5[0-5]|3[0-3]|4[012]|[67][01]|[89]0)|5(?:7[0-3567]|5[024568]|[28][0-3]|0[12]|[146]0)|7(?:3[0-4]|2[02-5]|0[01]|1[09])|9(?:50|42))|7(?:2(?:5[02-9]|6[0-578]|1[0-6]|7[0567]|9[012]|4[89]|09)|1(?:7[0-9]|8[02-7]|1[23679]|5[015]|6[23]|[249]0|[03]9)|0(?:0[0124-9]|2[0-7]|1[0125-9]|5[0-5]|30)|3(?:0[0-7]|2[0125]|1[056]|3[01])|4(?:6[6-9]|70))|1(?:4(?:8[015]|6[056]|9[059]|[57][05]|[34]5)|8(?:0[05]|7[15]|[69]0|[15]1|[238]5)|7(?:0[01]|[15][05]|[39]0|65)|6(?:[378][05]|[46]0|55)|5(?:[69][05]|70|[18]5)|3(?:5[05]|[046]0|35)|2(?:[23][05]|40|15))|0(?:8(?:3[0124-9]|[17][0-5]|5[0-4]|2[01289]|8[0156]|4[0567]|6[012]|0[014])|200|909)|8(?:0(?:0[1-9]|1[012]))|9726)/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment