PHP - 特殊的正则表达式

时间:2015-10-26 15:38:21

标签: php regex

我有这个字符串:

for $b in doc('CIDEMdb/CIDEM.xml')//SFEvents/EventList/Event
let $date_string as xs:string :=$b/TimeStamp/data() 
let $date as xs:dateTime := xs:dateTime($date_string)  
where $date ge xs:dateTime('"+startdate+"') and $date le xs:dateTime('"+enddate+"')  
return $b

我需要得到这个:

var wcall=wicketAjaxGet('?x=-DxRtr1ApWy1S-JoAgFwCid5mDvsjhWOhXpq0nZdO*WsUggdTvpUtQ',function() { }.bind(this),function() { }.bind(this), function() {

我怎么能用PHP做到这一点?

1 个答案:

答案 0 :(得分:1)

使用类似的东西

<?php
if (preg_match("/wicketAjaxGet\('([^']*)'/", $your_string, $matches)) {
    echo $matches[1]; // here is what you are looking for
}