[DOC-CVS] [doc-en] master: Update preg-match.xml to clarify language around when using offset making \A and ^ inoperable (#5652)
[email protected] (Richard Bairwell via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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>