# More preg_match_* control

- Thread: https://externals.io/message/2848
- Original archive: https://news-web.php.net/php.internals/2848
- Started by Andrei Zmievski on 2003-06-26T17:12:44+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2848 — Andrei Zmievski — 2003-06-26T17:12:44+00:00

URL: https://externals.io/message/2848#2848

Hi,

Apparently a few people are doing a lot of bioinformatics data sifting
with PHP and one of them asked me if it would be possible to add a
parameter to preg_match_* functions to indicate the starting offset for
the search. I think it's a good idea, and having looked at the current
implementation, I think this parameter can just come after the 'flags'
one. It won't be used that often, so specifying 0 for flags in that case
is okay. Any thoughts or objections?

-Andrei
* Entropy isn't what it used to be. *

---

## #2849 — Sebastian Bergmann — 2003-06-26T17:19:44+00:00

URL: https://externals.io/message/2848#2849 · In reply to: #2848

Andrei Zmievski wrote:
> Any thoughts or objections?

  On a sidenote, the bundled PCRE library is a bit outdated (I have 4.x
  on my GENTOO laptop, for instance).

  Can ext/pcre be built against a system library rather than the
  bundled one? Last time I tried it failed.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

         http://www.professionelle-softwareentwicklung-mit-php5.de/

---

## #2850 — Andrei Zmievski — 2003-06-26T17:25:16+00:00

URL: https://externals.io/message/2848#2850

>   On a sidenote, the bundled PCRE library is a bit outdated (I have 4.x
>   on my GENTOO laptop, for instance).

Yeah, but there is nothing that's changed much. I suppose we can
upgrade.

What are your thoughts on my proposal for the new parameter?

>   Can ext/pcre be built against a system library rather than the
>   bundled one? Last time I tried it failed.

Not sure. I haven't tried it in a loooong time.

-Andrei
* The future has arrived, it's just not evenly distributed. -W. Gibson *

---

## #2851 — Sebastian Bergmann — 2003-06-26T17:46:31+00:00

URL: https://externals.io/message/2848#2851 · In reply to: #2850

Andrei Zmievski wrote:
> Not sure. I haven't tried it in a loooong time.

  I just compiled HEAD with

    --with-pcre-regex=/usr

  where I have PCRE 4.2 installed.

  The build works fine, but `phpinfo()` shows

    PCRE Library Version 3.9 02-Jan-2002

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

         http://www.professionelle-softwareentwicklung-mit-php5.de/

---

## #2867 — Andrei Zmievski — 2003-06-26T23:06:22+00:00

URL: https://externals.io/message/2848#2867

>   I just compiled HEAD with
> 
>     --with-pcre-regex=/usr
> 
>   where I have PCRE 4.2 installed.
> 
>   The build works fine, but `phpinfo()` shows
> 
>     PCRE Library Version 3.9 02-Jan-2002

Hmm, I just did the same thing (--with-pcre-regex=/usr/local) and got
the 4.3 library that I installed.

Anyway, seems that 4.3 has some juicy bits like \Q and \E escapes,
possesive quantifiers, callouts, and named subpatterns. I'll start
working on integrating those.

-Andrei

"I fear more harm from everybody thinking alike than from some people
 thinking otherwise."
                      -- Charles G. Bolte

---

## #2879 — Andi Gutmans — 2003-06-27T08:01:05+00:00

URL: https://externals.io/message/2848#2879 · In reply to: #2848

I wonder if these people have a summary of things they ideally need. Then 
we could have ext/bioinformatics. Who knows, it might bring PHP to new places.
Anyway, I'm neutral about the parameter change. Will it be a default parameter?

Andi

At 01:12 PM 26/6/2003 -0400, Andrei Zmievski wrote:
>Hi,
>
>Apparently a few people are doing a lot of bioinformatics data sifting
>with PHP and one of them asked me if it would be possible to add a
>parameter to preg_match_* functions to indicate the starting offset for
>the search. I think it's a good idea, and having looked at the current
>implementation, I think this parameter can just come after the 'flags'
>one. It won't be used that often, so specifying 0 for flags in that case
>is okay. Any thoughts or objections?
>
>-Andrei
>* Entropy isn't what it used to be. *

---

## #2887 — Andrei Zmievski — 2003-06-27T11:58:08+00:00

URL: https://externals.io/message/2848#2887 · In reply to: #2879

> I wonder if these people have a summary of things they ideally need. Then 
> we could have ext/bioinformatics. Who knows, it might bring PHP to new 
> places.
> Anyway, I'm neutral about the parameter change. Will it be a default 
> parameter?

Yes, it would. Defaulting to 0 of course.

-Andrei

<yaragn> ever seen that movie? The Matrix?
<yaragn> with those green lines of flying text?
<yaragn> *THAT'S* Perl
