【发布时间】:2017-02-07 01:37:57
【问题描述】:
我有以下 HTML 标记部分...
<div style="margin: 0px 0px 0px 157px; padding: 16px 0px 16px 0px;">
<p class="sectionHdr">The page you requested is currently unavailable because the statistics are being updated.</p>
<p class="sectionHdr">The statistics update will finish in about 48 minutes 39 seconds.</p>
</div>
请问使用正则表达式提取分钟和秒值的 PHP 代码是什么?
我可以通过字符串操作来做到这一点,但我更喜欢用正则表达式来做到这一点,我只是一直无法理解它们!
【问题讨论】:
-
如果可能的话,我希望将“48”和“39”分开?
-
喜欢这个? phpliveregex.com/p/iW9你自己实际尝试过什么?
-
这看起来也可以。我把自己绑在了结上,却无处可去,这就是我问的原因。