fixup_po_box <- function(x) {
  gsub(
    "(P\\s*[.]*\\s*O\\s*[.]*\\s*B(OX)?|POST OFFICE BOX) #?(\\d+)",
    "PO BOX \\3",
    x
  )
}

REGEXP_REPLACE <- function(pattern, replacement, text, ...) {
}

fixup_po_box_query <- function(x) {
  var <- rlang::expr_text(rlang::enexpr(x))
  dbplyr::sql(
    sprintf(
      "REGEXP_REPLACE(%s, '%s', '%s')",
      var,
      "(P\\s*[.]*\\s*O\\s*[.]*\\s*B(OX)?|POST OFFICE BOX) #?(\\d+)",
      "PO BOX \\3"
    )
  )
}
