PHP では、正規表現を使用して次の式で文字を繰り返した文字列を変更したいと考えています。
1. Chars different from "r", "l", "e" repeated more than once
consecutively should be replaced for the same char only one time.
Example:
- hungryyyyyyyyyy -> hungry.
- hungryy -> hungry
- speech -> speech
2. Chars "r", "l", "e" repeated more than twice replaced for the same
char twice.
Example:
- greeeeeeat -> greeat
よろしくお願いします
パブロ