0
derzeit ist dies die Preg_replace-Zeichenfolge, die ich habe.Ersetzen Sie Zeichen durch ein anderes Zeichen in Regex PHP
$mtg_post['post_content'] = preg_replace("[^\\x20-\\x7e]", "",$ability);
Dies ist ein Beispiel für die in $ fähigkeit enthaltenen Daten.
At the beginning of your upkeep, put a doom counter on Armageddon Clock.£At the
beginning of your draw step, Armageddon Clock deals damage equal to the number
of doom counters on it to each player.£{4}: Remove a doom counter from Armageddon
Clock. Any player may activate this ability but only during any upkeep step.
Ich möchte das £ -Zeichen durch 2xreturn oder neuen Absatz ersetzen? in Regex wird die Zeile so aussehen, aber nicht ganz sicher, wie dies zu implementieren ist.
At the beginning of your upkeep, put a doom counter on Armageddon Clock.
At the beginning of your draw step, Armageddon Clock deals damage equal
to the number of doom counters on it to each player.
{4}: Remove a doom counter from Armageddon Clock. Any player may activate
this ability but only during any upkeep step.
Dies löscht die gesamten Zeilen, die in ihnen £ haben. –
Nicht für mich, noch würde das einen Sinn ergeben. Hier ist eine Demo: http://codepad.org/oho8zhgi – Cal
Ja ich manuell sogar den Text als die Variable und es entfernt die gesamte Zeile. Hier ist der Link zum Fullcode. http://codepad.org/DupoYKzY –