Hi Andrey,
The texts are okay, you'll find some comments on the structure :
Andrey Demenev wrote:
Index: preg-match-all.xml =================================================================== + <note> + <para> + Using <parameter>offset</parameter> is not equivalent to + passing <function>substr</function>($subject, $offset) to
This will be rendered as : passing substr()($subject, $offset) and I don't think it's what you want. You may try something like <literal>substr($subject, $offset)</literal>. This also apply to the other page.
+ <function>preg_match_all</function> in place of the subject string, + because <parameter>pattern</parameter> can contain assertions such as + <emphasis>^</emphasis>, <emphasis>$</emphasis> or + <emphasis>(?<=x)</emphasis>. See <function>preg_match</function> for + examples. + </para> + </note> Index: preg-match.xml =================================================================== + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + $subject = "abcdef"; + $pattern = '/^def/'; + preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3); + print_r($matches); +?>
The example should start at column 0 (no tab before $subject)
+]]> + </programlisting> + <para> + will produce + </para>
We introduced an entity for this kind of stuff : &example.outputs; You should use it like this :
<programlisting> </programlisting> &example.outputs; <screen> </screen>
+ <screen> +<![CDATA[ +Array +( +) +]]> + </screen> + <para> + and
"While this example"
+ </para> + <programlisting role="php"> +<![CDATA[ +<?php + $subject = "abcdef"; + $pattern = '/^def/'; + preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); + print_r($matches); +?> +]]> + </programlisting> + <para> + will produce
Don't use &example.outputs; here, your suggestion is okay for the second example.
Thank you a lot for your patch,
didou