简体   繁体   中英

Regex HTML comments (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?

解决此问题并获得该数字的正确正则表达式:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM