How to Parse and Standardize Street/Postal Addresses

For any apps or websites that work with addresses, it's necessary for these addresses to be validated and parsed, as well as standardized and verified. There are various mechanisms that are best suited to different projects, so figuring out what you need exactly isn’t always that easy.

What Problems Appear Around Parsing and Standardization?

There are three primary issues that often occur in the parsing and standardization process.

Regular Expressions in Python Using The re Module

What is Regex?

Regex, or a more known terminology, Regular Expressions, is used to create complex patterns for searching substring inside Strings.

We have other methods of finding substring as well, but regex can cope up with way more complicated patterns than just normal searching for a substring.

Going Beyond Regular Expressions with Structural Code Search

We're introducing a new way to search code at Sourcegraph with structural code search. Structural code search lets you match nested expressions and whole code blocks that can be difficult or awkward to match using regular expressions.

What Is Structural Code Search?

Structural code search is the idea that you can search for syntactic structures in code that correspond more closely to a program's underlying concrete syntax tree (or parse tree). For example, for loops in Rust look something like this: