|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-09-11 09:37 UTC] christian dot engelbert at googlemail dot com
Description:
------------
If the character '<' is used as a delimitier preg_replace forces the character '>' as ending delimiter. '<' is not working in this case. While using '>' as starting delimiter for the RegEx '>' is awaited to be used as the ending delimiter also.
Test script:
---------------
preg_replace('<p<', '', 'Apple');
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
Several delimiters are special cased: > It is also possible to use bracket style delimiters where the opening and closing brackets are the starting and ending delimiter, respectively. (), {}, [] and <> are all valid bracket style delimiter pairs. https://secure.php.net/manual/en/regexp.reference.delimiters.php