5
考慮以下字符串:將字符串分割爲雙克,忽略某些標籤
I have had the greatest {A} {B} day yesterday {C}
我想創建與雙克的陣列,忽略所有標籤(標籤{括號}之間)
[0] => I-have
[1] => have-had
[2] => had-the
[3] => the-greatest
[4] => greatest-day
[5] => day-yesterday
在PHP中,執行此操作的最佳方法是什麼?使用正則表達式或爆炸「」,然後遍歷所有單詞?我無法在這裏開始,所以任何幫助,將不勝感激:)