Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 有人能帮我在正则表达式中找到这个模式吗?_Php_Regex - Fatal编程技术网

Php 有人能帮我在正则表达式中找到这个模式吗?

Php 有人能帮我在正则表达式中找到这个模式吗?,php,regex,Php,Regex,我想将这些字符串与正则表达式匹配,并获取数据之间的所有数据。我已经尝试了所有方法,但仍然无法做到 这是我的正则表达式101: 代码如下: <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

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

这是我的正则表达式101:

代码如下:

<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战术资源或从场上丢弃有翼守护者。 依附于英雄。 附加英雄获得+1攻击。 行动:从附加英雄支付1笔资源';s池将Dunedain标记附加到另一个英雄身上。 行动:在你牌组的前5张牌中搜索任意数量的鹰牌,并将它们添加到你的手牌中。将其他牌洗回你的牌组。 依附于英雄。 附加英雄获得+1攻击。 行动:从附加英雄支付1笔资源';s池将Dunedain标记附加到另一个英雄身上。 守卫着。 回答:玩家成功完成任务后,如果没有附加遭遇战,玩家可以声称有咕噜的迹象。当被要求时,将咕噜的标志附在任何致力于任务的英雄身上。(作为条件附加计算:';强制:在附加的英雄受到伤害或离场后,将此卡返回遭遇牌组顶部。';) 有人能帮我找到解决方案吗?

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

“有人能帮我吗”当然。你试过使用HTML解析器吗。艾哈迈德,问题就在这里。。这是链接
http://hallofbeorn.com/LotR?CardSet=The+Hunt+for+Gollum
表示已写入上面带有
div
的代码。我也尝试过使用simple.html.dom来实现它,但仍然一无所获。。代码就是出于这个原因。。很难抓取我想你可以提取与正则表达式匹配的文本
(?s)(?Vivek谢谢你的时间,这是正确的。它还带来了一些其他数据,但它可以用数组管理谢谢