我想从cd数据中提取post_id
<script type='text/javascript' data-cfasync='false'>
//<![CDATA[
_SHR_SETTINGS = {"endpoints":{"local_recs_url":"https:\/\/klaudynahebda.pl\/wp-admin\/admin-ajax.php?action=shareaholic_permalink_related"},"url_components":{"year":"2018","monthnum":"06","day":"19","post_id":"21132","postname":"letnie-warsztaty-ziolowo-kosmetyczne-7-9lipiec","author":"admin"}};
//]]>
</script>
我可以获取整个CData,但不知道下一步该怎么办?在
如果您只需要
post_id
,请尝试使用regex
。在例如:
输出:
^{pr2}$也许这不是一个超级解决方案,但我明白了
输出
^{pr2}$相关问题 更多 >
编程相关推荐