且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Preg_match和Preg_replace麻烦正则表达式请帮助!

更新时间:2022-10-14 19:32:40

s,


结果)

但我没有成功。我尝试了类似..<! - #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">

再次,任何帮助表示赞赏。正则表达式让我感到困惑,我的大脑即将爆发所有的麻烦,我猜我只是不是很聪明的想法。出来。

请帮助!!

感谢


st ** ***@hotmail.com 写道:
需要提取以下字符串之间的所有文字,但不包括字符串。

" ;<! - #BeginEditable"标题名称" - >"
"< p align =" center"> ####< / p>"

我正在使用preg_match(??? ?,

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

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


st*****@hotmail.com wrote:
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(????,