I am working on a project and a part of it requires to validate name fields. 

Here is the logic:

> 
> If any name value contains an 'i' after 'e' that is not after 'c',
>  then issue an error.
> 
> 
> 

I know I should try to write something and then share it, but in this case I have no idea how its done. I know `preg_match()` can be a solution , but again I have no idea how its done.

I know I will get down vote due to not writing anything, but hopefully I get an answer.

Thanks Guys,