trim: logical. If TRUE removes leading and trailing white spaces.
clean: trim logical. If TRUE extra white spaces and escaped character will be removed.
pattern: A character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector. Default, @rm_phone uses the rm_phone regex from the regular expression dictionary from the dictionary argument.
replacement: Replacement for matched pattern.
extract: logical. If TRUE the phone numbers are extracted into a list of vectors.
dictionary: A dictionary of canned regular expressions to search within if pattern begins with "@rm_".
...: Other arguments passed to gsub.
Returns
Returns a character string with phone numbers removed.
Examples
x <- c(" Mr. Bean bought 2 tickets 2-613-213-4567 or 5555555555 call either one","43 Butter Rd, Brossard QC K0A 3P0 - 613 213 4567","Please contact Mr. Bean (613)2134567","1.575.555.5555 is his #1 number","7164347566","I like 1234567 dogs")rm_phone(x)ex_phone(x)