Gregory Machin wrote:

Hi.

Please could you advise me...
I have php pages that are stored in a mysql database, that will later
be imported into a cms
I want to use mysql's regex funtion to remove unwanted php code and
update links to images
and urls.

But i cant seem to get my brian around the regex part ...

i want to remove the header include <?php require("./include/header1");?>
i tried <\?php[^>][header1].*\?> , and other attempts but no luck ..
unfortunetly i can do a normal string replace because of varations,in
the code ...

Many Thanks

MySQL's REGEX is only for matching, not for replacement. If you really need a regex search and replace, you may find it easier to dump your data, edit it, and reimport it. If you are determined to do it in mysql, you'll need a (probably ugly) combination of mysql string functions. See the manual for details:

<http://dev.mysql.com/doc/mysql/en/string-functions.html>
<http://dev.mysql.com/doc/mysql/en/string-comparison-functions.html>

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to