> You are looking for the \G anchor or the A modifier.
Both of these options work great!
I've submitted a patch to the manual page with a note explaining these
options.
Thanks :-)
On Wed, Jun 7, 2017 at 10:13 PM, Nikita Popov wrote:
> On Wed, Jun 7, 2017 at 10:03 PM,
On Wed, Jun 7, 2017 at 10:03 PM, Rasmus Schultz wrote:
> What do you think about adding another option to preg_match() to allow the
> $offset parameter to be treated as the start anchor?
>
> The manual proposes to do this:
>
> $subject = "abcdef";
> $pattern =
On 07/06/2017 21:03, Rasmus Schultz wrote:
What do you think about adding another option to preg_match() to allow the
$offset parameter to be treated as the start anchor?
The manual proposes to do this:
$subject = "abcdef";
$pattern = '/^def/';
$offset = 3;
What do you think about adding another option to preg_match() to allow the
$offset parameter to be treated as the start anchor?
The manual proposes to do this:
$subject = "abcdef";
$pattern = '/^def/';
$offset = 3;
preg_match($pattern, substr($subject, $offset), $matches);
In