0

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!

2 Answers 2

1

You need to escape the parenthesis. Instead, try this

preg_match_all("/jQuery\(\'#showcasecities\'\).html\((\"(.*?)\")\);/", $string, $matches);
Sign up to request clarification or add additional context in comments.

Comments

1

Try this:

preg_match_all("#jQuery\('\#showcasecities'\)\.html\((.*)\)#",$string,$matches);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.