willsherwood
asked on
PHP preg_replace - how to make this match string span across lines?
I have the following PHP statement:
preg_replace("/%BEGINt%.*% END%/", '', $Content);
that is supposed to yield a result that omits %BEGIN% MyInnerText %END% from $Content
it works as long as $Content doesn't have any linebreaks within in the corresponding MyInnerText.
How can i get this search string to be line-break-insensitive?
Note that i do not want linebreaks deleted in general from $Content
thanks
preg_replace("/%BEGINt%.*%
that is supposed to yield a result that omits %BEGIN% MyInnerText %END% from $Content
it works as long as $Content doesn't have any linebreaks within in the corresponding MyInnerText.
How can i get this search string to be line-break-insensitive?
Note that i do not want linebreaks deleted in general from $Content
thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
is the statement used to read the file
thanks to all!