Hello,
I think I have a problem.
I have two columns with phone numbers. And I need to check if they are the same.
The phone numbers have between 10 and 8 digits.
The data frame I am using hast the variables phone1 and phone2, and I need to check a partial match with phone2 over phone1.
I tried something like this
str_detect("45625819/5637514682 office","625819")
But when I try using variables, I get
Error in stri_detect_regex(string, pattern, negate = negate, opts_regex = opts(pattern)) :
Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX)
I know how to extract the last 7 digits from variable phone2. But I really don't know how to apply the str_detect(phone1, phone2) using mutate.
phone1 and phone2 include some special characthers as "/" and " - ". Even some text.
I hope you can help me.
Thanks