remove Niqqud from string in javascript

后端 未结 1 1444
一生所求
一生所求 2021-01-22 03:38

I have the exact problem described here:

removing Hebrew "niqqud" using r

Have been struggling to remove niqqud ( diacritical signs used to

相关标签:
1条回答
  • 2021-01-22 04:12

    Just a slight problem with your regex. Try the following:

    const input = "הֻסְמַק";
    console.log(input)
    console.log(input.replace(/[\u0591-\u05C7]/g, ''));
    
    /*
    $ node index.js
    הֻסְמַק
    הסמק
    */
    
    0 讨论(0)
提交回复
热议问题