Reputation: 191
I want to get "bla bla bla" from this string
jQuery('#showcasecities').html("bla bla bla");
I've tried
preg_match_all("/jQuery(\'#showcasecities\').html(\"([^`]*?)\");/", $string, $matches);
no luck =( please help!
Upvotes: 0
Views: 768
Reputation: 3911
Try this:
preg_match_all("#jQuery\('\#showcasecities'\)\.html\((.*)\)#",$string,$matches);
Upvotes: 1
Reputation: 398
You need to escape the parenthesis. Instead, try this
preg_match_all("/jQuery\(\'#showcasecities\'\).html\((\"(.*?)\")\);/", $string, $matches);
Upvotes: 1