Hi,
In php, I'm trying to grab and then replace a substring in a string of the form:
"This is a test of the <%JavaScript%> RegExp object"
I need to grab the string that is inside the <% %> bookends. Then I need to replace the whole <%xxx%> expression with another value. I think a workable RegEx is "\<\%.*\%\>".
What would be the proper way to grab the stuff between the bookends and what is the proper way to replace the expression, including bookends.
Thanks!
|