I am using Ruby regex to filter the user input to allow only numerics and alphabets of any language. But for some words the spelling is different after using regex. ex:
text = 'कंप्यूटर'
regex = /[^(\p{Alpha})]/
filter_text = text.gsub(regex, '') #return result कंपयूटर
You can see the input and output are different. How to resolve the same.