How to check if any Arabic character exists in the string ( javascript )

后端 未结 5 1725
南方客
南方客 2020-12-05 01:03

How to check if any Arabic character exists in the string with javascript language

5条回答
  •  醉酒成梦
    2020-12-05 01:26

    use this

    containsArabicNumber(text){
        var reg = /[۰١٢٣٤٥٦٧٨٩]/;
        return reg.test(text);
    }
    

提交回复
热议问题