Linked Questions

0 votes
1 answer
386 views

Regular Expression for US and other format zip [duplicate]

Am working on regular expression for following formats of zip in groovy Includes a letter (L12345) Includes a dash plus 4 more numbers (77056-1234) Includes spaces (77056 1234) I have this "^\d{5}(-\...
OTUser's user avatar
  • 3,778
1 vote
1 answer
519 views

Validate zip code in jQuery? [duplicate]

What would be the best way to validate a zip code in jQuery, I'm not talking about if its a 5 character number, I'm talking about a VALID zip code, like it checks with some service to make sure its ...
William L.'s user avatar
  • 3,866
1 vote
0 answers
432 views

International Postal Code Validation [duplicate]

Possible Duplicate: What is the ultimate postal code and zip regex? Is there a well-defined set of regexes for validating international postal codes? I have 52 different countries that I have to ...
Mark Richman's user avatar
  • 29.4k
415 votes
20 answers
1.3m views

Regex for numbers only

I haven't used regular expressions at all, so I'm having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the two examples below it is ...
Timothy Carter's user avatar
139 votes
4 answers
202k views

regex for zip-code

Possible Duplicate: What is the ultimate postal code and zip regex? I need Regex which can satisfy all my three condtions for zip-code. E.g- 12345 12345-6789 12345 1234 Any pointers and ...
Shaitender Singh's user avatar
68 votes
10 answers
37k views

How should international geographical addresses be stored in a relational database?

Given the task of storing international geographic addresses in a relational table, what is the most flexible schema? Should every part of the address be broken out into their own fields, or should it ...
Bob's user avatar
  • 98.7k
2 votes
6 answers
12k views

validate zip code in javascript

<input type="text" id="zipCode" /> how can i validate that this is a valid zip code in javascript?
Scott's user avatar
  • 4,162
4 votes
5 answers
3k views

Remove US zip codes from a string: R regex

I am attempting to remove/extract zip codes from a character string. The logic is that I am grabbing things that: must contain exactly 5 consecutive digits OR must contain exactly 5 consecutive ...
Tyler Rinker's user avatar
2 votes
2 answers
3k views

dart regex for validating postal code format

I'm trying to create regex to validate all postal and zip codes format. I found an answer for this What is the ultimate postal code and zip regex? but it doesn't work in dart. Here are the criteria ...
delmin's user avatar
  • 2,500
1 vote
1 answer
3k views

php - check if an address string has a zipcode

I'm trying to use regex to check if a full address string contains a zipcode, can someone help me out? $address = '10100 Trinity Parkway, 5th Floor Stockton, CA 95219'; if (preg_match('--regex_here--'...
Joe's user avatar
  • 1,772
3 votes
2 answers
9k views

How to validate zip code in java if the zip code pattern changes dynamically?

I need to validate the zip code in java. I have googled and there are many regular expressions. The problem I have is the required zip code pattern may change from some admin settings page. Like at ...
ajm's user avatar
  • 13.1k
2 votes
1 answer
3k views

Extract address from business card with maximum probability

I have an image of the business card. Using OCR I can convert this image to Text. Now I want to separate information and add into contact. By regex, I can parse information like phone, email, website ...
Nil's user avatar
  • 312
2 votes
2 answers
2k views

Is there a library for normalizing postal codes?

Users of my application are asked for their country and postal code. I want to use the postal codes as a key in data store. Because the postal codes are entered by the user they can have been entered ...
Adam's user avatar
  • 44.4k
1 vote
2 answers
1k views

regex to extract postal code from an address

I have a list of addresses have merged postal codes shown below 65 Windermere Ave., Toronto, ON, M6S 3J4 15 Bruyeres Mews, Toronto, ON M5V 0G8, Canada M6M1N7, Canada 437 revus Ave, L5G 1S2, ...
Taimorr Mughal's user avatar
0 votes
1 answer
2k views

How can write regex validate for zipcode in laravel validation?

I have a registration form. I need to validate zipcode. Validation rules must be integer, Max length not greater than 7. I had tried validation but it validate zip must be 5. But some countries has ...
Sarath TS's user avatar
  • 2,442

15 30 50 per page