Regular Expression snippets

preg_match_all to extract the term name from an html tag.

preg_match_all('/(.+)<\/script.*>/uis', $contents, $matches);

Comments