Assume I have this piece of code:
<?php
$error = true;
$message = "An error occured."
?> |
I used this in some old script of mine, and I used it a lot, so it would be wise to replace this with trigger_error("Blabla");
That's why I made this regex to apply it to all my php-files in some project:
\$error[\s]*=[\s]*true;[\s]*\n[\s]*\$message[\s]*=[\s]*["'](.*?)["']; |
But it doesn't work! Although I'm pretty sure it's correct. When I try:
and
\$message[\s]*=[\s]*["'](.*?)["']; |
seperately they work fine. I also tried using [.]* and [\s]*\r[\s]* and lots of other variants instead of [\s]*\n[\s]* but I can't get them to work. Is there a known bug with regexes in the search and replace of PhpED? Or am I making a wrong turn somewhere?