0
現在、これは私が持っているpreg_replace文字列です。regexの文字を他の文字に置き換えるPHP
$mtg_post['post_content'] = preg_replace("[^\\x20-\\x7e]", "",$ability);
これは$能力内に含まれるデータの例です。
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.
£文字を2xreturnまたは新しい段落に置き換えますか?正規表現では、この行はこのように見えますが、これを実装する方法はあまりよく分かりません。
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.
これは、彼らに£ている行全体を削除します。 –
私にとってではなく、それは意味をなさないでしょう。ここではデモです:http://codepad.org/oho8zhgi – Cal
私は手動で変数としてテキストを入れて、それは全体の行を削除します。ここにフルコードへのリンクがあります。 http://codepad.org/DupoYKzY –