i have this,
/(?<!\pL)(أحمد|محمد|حسن|محسن|على|حاتم|مصطفى)(?!\pL)/iu
it match just one word, maybe the first one, take a look here (https://regex101.com/r/3CEPHo/1)
how can i make it match all, and is there best practice in this? this words in the group may exceed 2000 work, is matching it with regex right?
You can use this regular expression to match all Arabic characters including spaces
For PHP
Or this (language independent):