Answers for "multi line dot match php"

PHP
0

multi line dot match php

// This problem can be solved adding the “s” modifier to the regular
// expression. With this modifier, the “.” wildcard character matches 
//any possible character in the string, including newlines:

preg_match("#<body>(.*)</body>#s",$document,$matches)
Posted by: Guest on October-31-2020

Browse Popular Code Answers by Language