Description Usage Arguments Value TODO See Also Examples
Returns an empty string where no match is found.
The string can be an address or any text string.
For large flat files, use find_postcodes()
.
1 | find_postcodes_in_string(string, locale = "GBR")
|
string |
Input vector. Either a character vector, or something coercible to one (e.g. a data frame). |
locale |
A string, the country code in format ISO 3. Default is "GBR". |
A character vector containing all the matches.
Handle extra white spaces: try trimming ws inside postcode if not match Handle special cases with lower casing without interferring with other strings such as Ec2M 1aA Handle case: currently only findingpostcodes that are in caps (to deal with possible typos, see test)
1 2 | string <- "The quick brown fox lives at 6 Bridge Road, N17 0RN."
find_postcodes_in_string(string)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.