if (preg_match('/<!-- Begin Code -->(.*?)<!-- End Code -->/s', $subject)) {
# Successful match
} else {
# Match attempt failed
}
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
Your regex contains spaces, and may not work. The space may not be there.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875