[doc-en] master: Update preg-match.xml to clarify language around when using offset making \A and ^ inoperable (#5652)

From: Date: Tue, 18 Aug 2026 17:55:33 +0000
Subject: [doc-en] master: Update preg-match.xml to clarify language around when using offset making \A and ^ inoperable (#5652)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23571@lists.php.net to get a copy of this message
Author: Richard Bairwell (rbairwell) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-08-18T19:55:30+02:00 Commit: https://github.com/php/doc-en/commit/aa5a948a110f87b5ca4d2510288e0ad37e21ead0 Raw diff: https://github.com/php/doc-en/commit/aa5a948a110f87b5ca4d2510288e0ad37e21ead0.diff Update preg-match.xml to clarify language around when using offset making \A and ^ inoperable (#5652) * Update preg-match.xml Try to clarify the language around using \G instead of substr. It read as if ^ and \A both worked with offset and to use use \A instead of ^. Co-authored-by: Jordi Kroon <jordikroon@php.net> Changed paths: M reference/pcre/functions/preg-match.xml Diff: diff --git a/reference/pcre/functions/preg-match.xml b/reference/pcre/functions/preg-match.xml index 8e2224c59f97..8e8809f754e4 100644 --- a/reference/pcre/functions/preg-match.xml +++ b/reference/pcre/functions/preg-match.xml @@ -229,12 +229,12 @@ Array ) ]]> </screen> - <para> + <simpara> Alternatively, to avoid using <function>substr</function>, use the <literal>\G</literal> assertion rather than the <literal>^</literal> anchor, or - the <literal>A</literal> modifier instead, both of which work with + the <literal>A</literal> modifier; both of which do not work with the <parameter>offset</parameter> parameter. - </para> + </simpara> </informalexample> </para> </note>

« previous php.doc.cvs (#23571) next »