Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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)
 
PREVIOUS NEXT
Tagged: #multi #line #dot #match #php
ADD COMMENT
Topic
Name
5+4 =