Questions tagged [postal-code]

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

In February 2005, 117 of the 190 member countries of the Universal Postal Union had postal code systems. Countries that do not have national systems include Ireland and Panama. Although Hong Kong and Macau are now Special Administrative Regions of China, each maintains its own long-established postal system, which does not utilize postal codes for domestic mail, and no postal codes are assigned to Hong Kong and Macau. Mail between Hong Kong, Macau and mainland China is treated as international.

399 questions
1
vote
1 answer

How to store global addresses in database?

Currently we have the following US-centric database design for storing addresses: street_address_1 text street_address_2 text city text state_province text postal_code text country text But now I've learned that some countries do not use any…
William Entriken
  • 37,208
  • 23
  • 149
  • 195
1
vote
4 answers

Postal Code error PayPal (PHP)

I want to integrate PayPal on my website with PayPal integration wizard. I use PayPal API and expresscheckout.php, paypalfunctions.php generated by PayPal Integration Wizard. I wrote form to fill billing data to post to PayPal, but it returns Error…
Greg
  • 11
  • 1
  • 1
  • 3
1
vote
4 answers

regex for matching german postal codes but not a

following string: 23434 5465434 58495 / 46949345 58495 - 46949345 58495 / 55643 d 44444 ssdfsdf 64784 45643 dfgh 58495/55643 48593/48309596 675643235 34565435 34545 it only want to extract the bold ones. its a five digit number(german). it should…
choise
  • 24,636
  • 19
  • 75
  • 131
1
vote
1 answer

Printing matching Regex(re class) not working while looping through a CSV file? (Using Python 3.6 on Win 10)

I am trying to use Regex to return Canadian postal codes through a each line of a CSV file. Environment: Python 3.6 on Win 10. Code tested through Jupyter Notebook and through the Win 10 CLI prompt. The problem is that I can't seem to get the object…
Davesdere
  • 11
  • 3
1
vote
2 answers

Two criterias and single regex for generic postal code

I created a regex for postal code (non us countries) to include two criterias .. minimum 5 chars , max 10 chars should have only alpha numneric with only one space/hyphen in the middle regex: ^([a-zA-Z0-9]{3,10}[…
1
vote
1 answer

How to get 4 sequetial numbers for postcode in javascript from a string?

I am trying to figure out how to get 4 sequential numbers from a string which will be a postcode from the string. The regex seems to work fine in regex 101 but when I try to use it in javascript I get an error that reads Uncaught SyntaxError:…
kevinabraham
  • 1,378
  • 4
  • 28
  • 55
1
vote
2 answers

Turning Longitudes and Latitudes into UK Postcodes in R

I have a large set of data with Longitudes and Latitudes that I want to convert into UK Postcodes. I first tried downloading all of the UK postcodes with their corresponding long/lat and then joining the data together. This worked for some of the…
1
vote
2 answers

RegEx Jquery Postcode for europe or uk

Trying to allow either UK postcode (GF433ED) or European postcode (12345) return true or false but the below code always returns false: function valid_postcode(postcode) { postcode = postcode.replace(/\s/g, ""); alert(postcode); var…
Max
  • 27
  • 6
1
vote
1 answer

How to get street name from postcode using maps API?

I'm looking for solution to change post code e.g DD3 7BN, but not using geo position. I found one solution using url http://maps.googleapis.com/maps/api/geocode/json?address=DD37bn. One guy was provide another solution but its not work for me. But…
BillIT
  • 53
  • 1
  • 14
1
vote
1 answer

Postcode Anywhere (PCA Predict) not working on contact or account form in Dynamics 365 mobile app

Was testing PCA Predict on my android using Dynamics 365 for mobile and it doesn't work. It definitely works in the desktop client though. I debugged the code using the chrome debugger whilst previewing the mobile client online and got the following…
1
vote
1 answer

NUTS Regions to UK Postcodes

I was just wondering if anybody had a reliable way to convert UK postcodes to their respective NUTS region/code? I managed to find a .csv on eurostat's website, but their data appears to be a bit inaccurate (i.e classifying Dudley as in Scotland…
Ed Cunningham
  • 179
  • 1
  • 3
  • 17
1
vote
1 answer

Convert the given regular expression in veribose format to use a format usable to validate UK postcode in asp.net?

I have regular expression I need to use this regular expression to validate the UK postcode. I have converted that to a format to work with asp.net regular expression engine. Could anyone please guide me what I have done is correct or if there is…
aja
  • 35
  • 4
1
vote
2 answers

US/UK/CA Postal Code validation in PHP

Im not so good with regex. Im looking to add a validation function that will return true/false if the string entered into it is a valid US, UK, or CA zip/postal code. US: NNNNN CA: LNL NLN UK: Lots of combinations L = letter, N = Number There are…
user15063
1
vote
4 answers

Validate UK Postcode - both short and long version

I have tried the one on the .gov website, as stated on many questions here, but it doesnt seem to work for short postcodes. My regex: preg_match('^(([gG][iI][rR]…
Ryan Hipkiss
  • 648
  • 1
  • 7
  • 20
1
vote
1 answer

No postal code in Geocoder android API

Postal code is always null in address.getPostalCode() of Adress class from Geocoder Android Api, but am able to see the complete address with postal code (i dont want to split the postal code from the full address). Please suggest is there any…
Ravi
  • 111
  • 1
  • 5