Bug #76861 [Nab]: Delimiter Bug using <

From: Date: Tue, 11 Sep 2018 09:46:55 +0000
Subject: Bug #76861 [Nab]: Delimiter Bug using <
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216981@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76861&edit=1 ID: 76861 Updated by: requinix@php.net Reported by: christian dot engelbert at googlemail dot com Summary: Delimiter Bug using < Status: Not a bug Type: Bug Package: *Regular Expressions Operating System: Linux 3.13.0-93-generic Ubuntu PHP Version: 7.0.31 Block user comment: N Private report: N New Comment: Add that to the list of things to be fixed with the next version of bugs.php.net... Previous Comments: ------------------------------------------------------------------------ [2018-09-11 09:44:07] peehaa@php.net Eeeek sorry for reopening. I got ninja'd on this one. ------------------------------------------------------------------------ [2018-09-11 09:43:21] peehaa@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ------------------------------------------------------------------------ [2018-09-11 09:42:36] peehaa@php.net 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 ------------------------------------------------------------------------ [2018-09-11 09:41:39] requinix@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php http://php.net/manual/en/regexp.reference.delimiters.php ------------------------------------------------------------------------ [2018-09-11 09:37:06] 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'); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76861&edit=1

« previous php.bugs (#216981) next »