First of all: I'm very bad with regular expressions, the ones I already have here I found on the net.
I want to increment the first number in a string, e.g. $teststring = "abcd1234efgh56";
I have already found the following:
preg_replace( "|(\d+)|e", "$1+1", $teststring);
will result in abcd1235efgh57
preg_replace( "|(\d+)(?!.*\d)|e", "$1+1", $teststring);
will result in abcd1234efgh57
but how do I increment ONLY the first number (1234 in the example) while leaving the rest of the string as is?
Thank you very much in advance