Hi everyone--
I have a string var that is riddled with special characters, which is ultimately precluding me to complete a fuzzy match on two data sets. I am trying to strip this string var of all special characters (i.e. "" , . - () [] etc.), but have not been successful in finding a way to get rid of all characters. I have tried using commands such as:
replace shortcounterpartyname=regexr(shortcounterpartyname , "`" "," "." "'" "inc." " inc." "/" " - " "-" " . " "[0-9][0-9][0-9][0-9]" " s.a. " "llc" " llc" " ltd." "(" ")", "")
replace shortcounterpartyname=subinstr(shortcounterpartyna me, "(","",.)
However, I have yet to find a way to get rid of quotation marks (even after reading a plethora of other help articles on this same issue including http://www.stata.com/statalist/archi.../msg00179.html). Additionally, I have found that Stata is dropping the first letter of some names, even if that observation doesn't have any special characters within its name.
If anyone has any suggestions regarding this issue, please let me know!
Thanks,
Rebecca
I have a string var that is riddled with special characters, which is ultimately precluding me to complete a fuzzy match on two data sets. I am trying to strip this string var of all special characters (i.e. "" , . - () [] etc.), but have not been successful in finding a way to get rid of all characters. I have tried using commands such as:
replace shortcounterpartyname=regexr(shortcounterpartyname , "`" "," "." "'" "inc." " inc." "/" " - " "-" " . " "[0-9][0-9][0-9][0-9]" " s.a. " "llc" " llc" " ltd." "(" ")", "")
replace shortcounterpartyname=subinstr(shortcounterpartyna me, "(","",.)
However, I have yet to find a way to get rid of quotation marks (even after reading a plethora of other help articles on this same issue including http://www.stata.com/statalist/archi.../msg00179.html). Additionally, I have found that Stata is dropping the first letter of some names, even if that observation doesn't have any special characters within its name.
If anyone has any suggestions regarding this issue, please let me know!
Thanks,
Rebecca
Comment