I can’t found out how to solve the following problem:
preg_replace("/e[^t]/", "", "testet");
This shall cut out just the ‘e’, but it deletes ‘es’. How can I achieve it that it only deletes the first e (and leaves the second one ‘et’ out)?
Thanks!
Negative lookaheads:
As explained here lookaheads don’t capture characters (consume characters) they only assert if the match would be valid.