我一直試圖弄清楚這一整天,但我怎麼可以可靠地拆分下一行的順序。我試圖用正則表達式分割一個句子
被動:標記與附近盟友隔離的敵人。主動: 特賣70/100/130/160/190(+)物理傷害。如果目標是孤立的 ,則金額將增至100/145/190/235/280(+)。進化 擴大爪子:對其孤獨的敵人造成的傷害提高012/16/12/12/12/12%12/12/12/12/12%(最大200/200/200/200/2001與 怪物)。使他們的恐懼品味和Kha'Zix的基本攻擊範圍增加50/50/50/50/50。
Array
(
[0] => Array
(
[0] => Passive
[1] => Marks enemies who are isolated from nearby allies.
)
[1] => Array
(
[0] => Active
[1] => Deals 70/100/130/160/190 (+) physical damage. If the target is isolated, the amount is increased to 100/145/190/235/280 (+).
)
[2] => Array
(
[0] => Evolved Enlarged Claws
[1] => Increases damage to isolated enemies by 12/12/12/12/12% of their missing health (max 200/200/200/200/200 vs. monsters). Increases the range of Taste Their Fear and Kha'Zix's basic attacks by 50/50/50/50/50.
)
)
我不能讓過去的中期句段。
你最好尋找一個在有一個冒號的關鍵字結束(「主動:」,「被動:」和「進化的爪子:」)並使用它們。我看不出有什麼辦法可以用句點來分解它。 – andrewsi
它將按照「被動」,「主動」的順序匹配? – hjpotter92
http://stackoverflow.com/questions/5032210/php-sentence-boundaries-detection –