fork(1) download
  1. x = c("123 w. main ave., city, st", "mr. smith", "456 main st.")
  2. gsub("(?|(m)(rs?\\. )|( a)(ve\\.[\\s,])|( s)(t\\.(?:[\\s,]|$)))", "\\U\\1\\L\\2", x, perl=T)
Success #stdin #stdout 0.24s 60752KB
stdin
Standard input is empty
stdout
[1] "123 w. main Ave., city, st" "Mr. smith"                 
[3] "456 main St."