问题描述
需要提取以下字符串之间的所有文字,但不是
包括字符串。
"<! - #BeginEditable" Title name" - >"
"< p align =" center"> ####< / p>"
我正在使用preg_match (????,$ s,$ results)
但我没有成功。我尝试了类似..<! - #BeginEditable
" Title name" - >"。*。"< p align =" center"> ####< / p>"
但是没有运气。
敬请任何帮助。
此外,我需要使用preg_replace来替换以下内容:
< a href =" / folder2 / folder1 / folder / * page.html">
with
< a href =" site.com = page.php?option * = paper& itemid =页。 html">
再次,任何帮助表示赞赏。正则表达式让我感到困惑,我的大脑即将爆发所有的麻烦,我猜我只是不是很聪明的想法。出来。
请帮助!!
谢谢
need to extract all text between the following strings, but not
include the strings.
"<!-- #BeginEditable "Title name" -->"
"<p align="center">#### </p>"
I am using preg_match(????, $s, $results)
but I have had no success. I tried items like.. "<!-- #BeginEditable
"Title name" -->".*."<p align="center">#### </p>"
But have had no luck.
Please any assistenc is appreciated.
In addition, I need to use preg_replace to replace the following:
<a href="/folder2/folder1/folder/*page.html">
with
<a href="site.com=page.php?option*=paper&itemid=page. html">
Again, any help is appreciated. The regular expressions confuse me, my
brain is about to explode from all the trouble shooting, I guess I''m
just not smart emough to figure it out.
PLEASE HELP!!
thanks
这篇关于Preg_match和Preg_replace麻烦正则表达式请帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!