Closed stevesolun closed 2 years ago
It uses \w
to define letters which is defined as [A-Za-z0-9_]
. You would need to write your own custom regex to handle the non-ascii letters
@trinker but you may observe that it works for others in the above stackoverflow question (akrun says it works for him).
Thanks for bringing to my attention. This is not added per your suggestion on stackoverflow
https://stackoverflow.com/questions/56546973/qdapregexrm-nchar-words-returns-different-results-when-non-english-letters-inv#comment99676381_56546973
Please help me with the following confusion:
qdapRegex::rm_nchar_words("è ûé", "1,2") [1] "è ûé"
qdapRegex::rm_nchar_words('k ku ppp d', "1,2") [1] "ppp" Why in the first code line it doesn't respond with "" but in the second one it works as expected. What do I miss here? The only thing I can think that in the first line of code the string is built from non English letters.
Any solution?