谁能帮我在正则表达式中找到这种模式?

时间:2020-04-11 00:25:57

标签: php regex

我想将这些字符串与正则表达式匹配,并获取<div>数据</div>之间的所有数据。我已经尝试了所有方法,但仍然无法做到...

这是我的正则表达式101:https://regex101.com/r/w7et0M/2

代码如下:

<div> Sentinel. Winged Guardian cannot have restricted attachments.
Forced: After an attack in which Winged Guardian defends resolves, pay 1 Tactics resource or discard Winged Guardian from play.
</div>

<div>Attach to a hero.
Attached hero gains +1 Attack.
Action: Pay 1 resource from attached hero&#39;s pool to attach Dunedain Mark to another hero.
</div>

<div>Action: Search the top 5 cards of your deck for any number of Eagle cards and add them to your hand. Shuffle the other cards back into your deck.
</div>

<div>Attach to a hero.
Attached hero gains +1 Attack.
Action: Pay 1 resource from attached hero&#39;s pool to attach Dunedain Mark to another hero.
</div>

<div>Guarded.
Response: After the players quest successfully, the players may claim Signs of Gollum if it has no attached encounters. When claimed, attach Signs of Gollum to any hero committed to the quest. (Counts as a Condition attachment with: &#39;Forced: After attached hero is damaged or leaves play, return this card to the top of the encounter deck.&#39;)
</div>

有人可以帮我找到解决方案吗?

1 个答案:

答案 0 :(得分:-1)

<div>((.|\n)*?)<\/div>