Preg_match and preg_replace trouble

This is a discussion on Preg_match and preg_replace trouble within the PHP General forums, part of the PHP Programming Forums category; I need to extract all text between the following strings, but not include the strings. "<!-- #BeginEditable "Title ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-31-2005
stoppal@hotmail.com
 
Posts: n/a
Default Preg_match and preg_replace trouble

I 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.h tml">


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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0