Created
March 30, 2019 23:21
-
-
Save naveed-ahmad/1e13d7a181dc84d409b406763209b88b to your computer and use it in GitHub Desktop.
Remove Arabic Accents/Diacritics
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
text = "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ" | |
text.gsub(/\u0FDF0|\u0FDF1|\u0066D|\u0061F|\u060F|\u060E|\u060D|\060C|\u060B|\u064C|\u064D|\u064E|\u064F|\u0650|\u0651|\u0652|\u0653|\u0654|\u0655|\u0656|\0657|\u0658/, '') | |
#=> بسم ٱلله ٱلرحمٰن ٱلرحيم |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some edge cases