Last active
June 18, 2020 06:24
-
-
Save michaelewens/f8e7886efc590207b12f7323f46f3d49 to your computer and use it in GitHub Desktop.
Make reclink work...?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // These seem to fix weird errors in the reclink command in Stata (i.e., it doesn't like some characters | |
| // Run this basic logic through your using and master strings. | |
| // This table is your friend: http://www.asciitable.com/ | |
| ** This one gets rid of all non-alphanumeric | |
| replace yourString = ustrregexra(yourString ,`"[^a-zA-Z0-9]"',"") | |
| ** Old, but still works | |
| replace yourString = subinstr(yourString, "$", "",.) | |
| replace yourString = subinstr(yourString, char(44), "",.) | |
| replace yourString = subinstr(yourString, "+", "",.) | |
| replace yourString = subinstr(yourString, char(34), "",.) | |
| replace yourString = subinstr(yourString, "c/o", " ", .) | |
| replace yourString = subinstr(yourString, ")", "", .) | |
| replace yourString = subinstr(yourString, "(", "", .) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment