|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-06-03 12:05 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2020-06-03 12:05 UTC] cmb@php.net
[2020-06-03 12:37 UTC] not-implemented at mark-plomer dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
Description: ------------ The following regex with non-greedy dot-all selector does not consume the last newline from input. Note that the PCRE-Modifier "m" is NOT used, so "$" should match the end-of-string only. Test script: --------------- $x = preg_replace('/A.*?$/s', 'X', "A\n"); echo json_encode($x); Expected result: ---------------- "X" Actual result: -------------- "X\n"