You need to implement the following: Replace the English E with YE, if E is at the beginning of any word in the line or after a, o, i, e, u, y

I would be very grateful for the regular expression example! Or an explanation of how you can check each first letter in each word with preg_replace and replace it

  • one
    What were you trying to do? Where is the code, where is the text on which to search? It is unlikely for you to do it. - And

1 answer 1

Something like a vskidku -

preg_replace("/(^|\s|a|o|i|e|u|y)([e|E])/", "$1Y$2", $string); 

case sensitive.