Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Remove all special characters from string except Turkish ones

there are tons of similar questions but i couldn’t find the exact answer.

I have a text like this;

str <- "NG*-#+ÜÇ12 NET GROUPنت ياترم "

I want to remove all special and non-Turkish characters and keep the others. Desired output is;

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

"NGÜÇ12 NET GROUP"

I really appreciate your help.

>Solution :

Please try

library(stringr)
str <- "NG*-#+ÜÇ12 NET GROUPنت ياترم "
str_replace_all(str, '[^[\\da-zA-Z ÜüİıÇ窺Ğğ]]', '')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading