I am having a problem creating a regex that suits the following criteria:
- prefix : Not starting with “di” and “men”
- Sequences of character : a-z
- suffix : End with: • in, at, ah, iah, • sequences of vowel (a,e,i,o,u), • then “wi”, • sequences of consonants ending with i
This is the regex that I created, but it seems doesn't work. Please help me.
$count = preg_match_all("^(^\bdi|^\bmen]\w*(in|at|ah|iah)((a|e|i|o|u)(wi)((?!(a\e\i\o\u)i$/",$value,$match);
For example, the output should capture word "lain", not "dian".