ID: 40219
Comment by: user at devnull dot org
Reported By: oliver dot christen at camptocamp dot com
Status: Open
Bug Type: Regexps related
Operating System: windows server 2003
PHP Version: 5.2.0
New Comment:
Read the documentation, you need delimiters around the expression.
Since ^ is the first character its making that the delimiter.
/^(.+)$/ works.
Previous Comments:
------------------------------------------------------------------------
[2007-01-24 15:08:15] oliver dot christen at camptocamp dot com
Description:
------------
when using preg_match, the end delimiter of regexp expression is now
expected to be ^, breaking all compability.
shouldnt the end delimiter be '$' ?
Reproduce code:
---------------
preg_match ("^(.+)$", 'foo', $regs);
print_r($regs);
Expected result:
----------------
Array
(
[0] => foo
[1] => foo
)
Actual result:
--------------
Warning: preg_match() [function.preg-match]: No ending delimiter '^'
found in C:\[..cut..]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40219&edit=1