Help with Regex
hi
I have this regular expression in php using preg_replace...
PHP Code:
preg_match("/\"\w+\"\.z\(\)/", $string, $matches);
anyway to keep it short it matches...
"This is a string".z()
and
"Another string".z()
but it unfortunately matches...
"GET: "http://this.url.com/".z()
when I want it to only match "http://this.url.com/".z();
I am new to creating my own regex and want to resort to
doing
\"[a-zA-Z0-9\D]*\"\.z\(\)
or is there a better way...
My objective is to create a regex that matches a string enclosed within double quotes followed that is passed to a function z() in javascript. The source string is also pre-processed to replace any escaped quotes inside the string.
Don't get me wrong as I believe if and when I help someone I also help myself whereby whatever someone learns I also learn.
But I will also accept credits or reps if you really want to part with it.