I've example text:
$text = "I've got a many web APP=. My app= is not working fast. It'= slow app=";
It is necessary to replace the symbol "=" with the letter "s" by the following condition: If the right or left with the "=" sign has a letter then replace it with the letter "s". Teaching the register of letters in the parent word. It would be better if you create three kinds of functions. One teaches the parent register, the second does not teach the register and replaces the upper letter "S" and the third with the small letter "s". As a result, there will be three results:
I've got a many web APPS. My apps is not working fast. It's slow apps - case insensitive regex replacing variant
I've got a many web APPS. My appS is not working fast. It'S slow appS - uppercase regex replacing variant
I've got a many web APPs. My apps is not working fast. It's slow apps lowercase regex replacing variant
My long code here:
$search = array("a=", "b=", "c=", "d=", "e=", "f=", "g=", "h=", "i=","j=", "k=", "l=", "m=", "o=", "p=","r=", .... , "z=");
$replace s array("as", "bs", "cs", "ds", "es", "fs", "gs", "hs", "is","js", "ks", "ls", "ms", "os", "ps","rs", .... , "zs");
$result = str_ireplace($search, $replace, $text);