我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

正则表达式HTML评论(PCRE)

I am trying to get the mediaID from an HTML block however I couldn't figure out a way to skip all the other parts and only get the mediaIDs within the HTML block?

<!-- wp:pdf-viewer-block/standard {"mediaID":5943} -->

I can select the HTML comment with the followings:

<!-- .* -->

Could you please show me a way to only get the mediaIDs?

The correct regex for solving this issue and getting that number:

<!-- wp:pdf-viewer-block.?standard {"mediaID":(.*?)} -->

近期文章

  • 本周包含哪几天[重复]
  • php,如何排序数组? [关闭]
  • 如何将laravel日志文件数据存储到数据库中(5.5)
  • 从电子邮件链接自动登录[重复]
  • 我们如此孤立的标签在php [关闭]
  • 如何在php上使用代码登录将页面设为私有? [重复]
  • 我如何在php上注销用户如果不活动10分钟[重复]
  • 使用PHP从URL获取数据并使用javascript在控制台中显示
  • 标头位置在服务器上不起作用,但适用于localhost
  • 使用ID AUTO_INCREMENT创建INSERT并获取该ID以更新另一个表
  • 确保两次没有选择任何值的最有效方法
  • 如何将此PHP代码集成到Laravel 5.1项目中?
  • PHP获取键值或最大值
  • php,phpMyAdmin sql错误
  • PHP限制上传大小验证
  • 我想要两个相等的变量
  • 使用PHP将嵌套的Json数组导入Mysql [关闭]
  • 为什么id不会通过链接? [关闭]
  • 是否有必要在创建网站时使用CodeIgniter? [关闭]
  • 如何检查字符串上有一个单词混合字母?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华