diff --git a/R/tidy_single_line_address.R b/R/tidy_single_line_address.R index f1053b7..b7a53fb 100644 --- a/R/tidy_single_line_address.R +++ b/R/tidy_single_line_address.R @@ -27,7 +27,7 @@ tidy_single_line_address <- function(df, col, remove_postcode = FALSE) { "(\\d)(\\D)", "\\1 \\2"), # add a space between any digit followed by a non-digit (e.g. 1A becomes 1 A) "(\\D)(\\d)", "\\1 \\2"), # add a space between any non-digit followed by a digit (e.g. A1 becomes A 1) "&", " AND "), # replace the ampersand character with the string "and" - "( ){2,}", " "), # replace any multiple spaces with a single space + "s\\+", " "), # replace any multiple spaces with a single space "([0-9]) - ([0-9])", "\\1-\\2")) # reconnect numbers separated by a hyphen ) }