Could someone help me with this?

I want to use dreamweaver regular expression repalce to replace

the string

=mysql_query(...);
with the string

=mysql_query(...) or die ("Database error, please contact the site admin.");

... means any characters, the sql query statements.

Thanks!

Differnet system such as dreamweaver, or textpad are using regular expression slight differently. I would like to use dreamweaver's regular expression replace function on this.

    Why not just do a smarter approach and use something like [man]set_error_handler/man to register your own function that handles all errors?

    Alternatively, you'd pretty much write it the same way you would in PHP, just without any delimiters:

    Find: mysql_query\((.*)\);
    Replace: mysql_query($1) or die('msg here');

      OK. so replace

      the string

      =mysql_query(...);

      with the string

      =mysql_query(...) or mydie ("Database error, please contact the site admin.", ...);

      using my own function mydie(). I will grab the ... from mysql_query(...), and the function will email the ... and the time, the filename to myself.

      So the regular expression will be

      Find: mysql_query((.*));
      Replace: mysql_query($1) or mydie('msg here', $1);

        Write a Reply...