Hallo, habe ein kleines Problem mit Regular Expressions :/
Der Text:
Code:
This is a test [getitem=584 count=1 search="SearchToken"] to test regexp...
But poorly it won't work [getitem=584 count=1 search="SearchToken"], but i don't know why.
Gewünscht ist:
Code:
This is a test ItemID584 to test regexp...
But poorly it won't work ItemID584, but i don't know why.
Aber die Ausgabe ist:
Code:
This is a test ItemID584, but i don't know why.
Code:
$text = preg_replace("/\[getitem=([0-9]{1,5}) count=([0-9]{1,5}) search=\"(.*)\"]/sie", "CreateItemThing(\\1, \\2);", $text);