## Create string with Arabic, latin, and Hebrew characters
x <- '\u0627\u0647\u0644\u0627 \u0648\u0633\u0647\u0644\u0627 Hello \u05d0'
## Remove characters from string that are not Arabic or latin
cleanChars(x)
Run the code above in your browser using DataLab