Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9156997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:54:19+00:00 2026-06-17T12:54:19+00:00

I am looking for some guidance for how I could check the pasteboard in

  • 0

I am looking for some guidance for how I could check the pasteboard in iOS for a valid mailing address.

If someone pastes

1234 Apple Street
New York, NY 10011

It parses each part of the string to fill in Address, City, State and Zip. It could be any address and It would be ideal if it could be found inside a longer string.

For example

Meet me at 1234 Apple Street New York, NY 10011 See you there!

Still will parse the correct Address, City, State and Zip.

Any help would be much appreciated!

-Wes

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:54:20+00:00Added an answer on June 17, 2026 at 12:54 pm

    I was a developer at SmartyStreets. We were kind of crazy about street addresses, and street addresses drove me crazy (especially parsing them). It’s a two-way street. (Am I done with the street puns?)

    First, let’s talk about the case where the address is all by itself, because that’s easier, albeit still difficult…

    Please reference this other question and answer about the very same thing. I also strongly encourage you follow the links to related questions in both the question and the answer. Parsing addresses is a can of worms, but it’s not impossible. It’s just really hard to do it reliably.

    Notice in the answer to that question how many different formats valid addresses can appear in. What guarantees do you have that the user will type it in any of those? And that’s only a few. There are others. Consider military, PO box, rural route, and other “special” addresses that don’t adhere to the typical format. What about addresses that have a two-or-three-word city name? What about addresses that use a grid system like 100 N 500 E, or secondary numbers like suite, apartment, floor, etc? What about addresses with “1/2”, hyphens (as a required punctuation), etc? Addresses missing zip codes or city/state?

    All of these and more could be valid. And that’s only for US addresses.

    If all your addresses, or even most of them (which isn’t the case), came in the form like you proposed above, as an example:

    [Primary Number] [Street Name] [Any of these street suffixes]

    [City Name Followed by a Comma], [State Abbreviation] [5-digit ZIP code]

    Then this would be quite easy. Wouldn’t that be nice?

    You could try to write a regular expression like this guy or that guy, but that only works if addresses are a regular language. They’re not regular, and regular expressions are not the answer.

    There are a few services which can do this for you because they have a master list (kind of), and the software has to meet rigorous certification standards.

    Obviously, since I work at SmartyStreets, I’m prone to suggest starting your search for an answer there. You can try some freeform addresses on the homepage (just fill out the “Street” field). But be aware of a few things that will probably always be an issue. LiveAddress API will be able to parse street addresses for you, most of the time. Shop around, but this should give you an idea.

    Now your second question: extract a street address from a string of text. This has been extensively covered elsewhere on S.O. and the interwebs, so I won’t go into a lot of detail. Basically, to do this reliably, you’ll probably need some Natural Language Processing and human interaction to confirm or correct the best guess.

    Don’t ever assume these things about un-standardized addresses:

    • Starts with a number
    • Ends with a number
    • Everything between the two numbers is an address
    • Has a ZIP code present
    • No more than 2 numbers will be in an address
    • It’s unambiguous
    • It exists
    • A street suffix will always be present
    • It’s spelled correctly
    • …etc.

    Again, refer to some other linked posts about this issue. You can make guesses, but always always always have a human confirm the guess if you do that. (Some Mac apps do this. If they detect an address, it will get highlighted, and you can add that address to your contacts. Unfortunately I’ve seen false positives a lot, and it also misses them a lot.)

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for some guidance on a WCF service I’m prototyping. I have a WCF
I'm looking for some guidance for a personal project of mine in RoR. I
Being a self-confessed newbie I'm looking for some advice and guidance :) I have
I'm looking for some guidance on the overall architecture of this little system I'm
I'm looking for some guidance for an object model I'm working on for an
I'm looking for some guidance on the best way to authenticate to my WebService.
Looking for some guidance, still a code learner and having a bit of a
To frame the question, I'm a designer/front-end developer and looking for some guidance on
I'm looking for some guidance on whether SQL Azure is a suitable platform for
I'm looking for some guidance in getting a Job Scheduler setup for use INSIDE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.