Why the following regular function call returns the value 1 :
1
preg_match('<strong>', '<strong[\>\s]+')
According to the documentation , I would think that they need to be canceled.
<strong> is a regular expression with angle brackets as delimiters . The actual regex is only part of strong , which successfully matches the subject line, as it has no ^ and $ bindings.
<strong>
strong
^
$
This will fail:
preg_match('/<strong>/', '<strong[\>\s]+')