简体   繁体   中英

PHP - special regular expression

i have got this string :

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

And i need to get this :

?x=-DxRtr1ApWy1S-JoAgFwCid5mDvsjhWOhXpq0nZdO*WsUggdTvpUtQ

How can i do that in PHP?

Use something like this

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

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