Re: Feature Request for pcre_match*()
| From: | derick@php.net | Date: | Tue, 05 Mar 2002 07:23:55 +0000 |
| Subject: | Re: Feature Request for pcre_match*() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80721@lists.php.net to get a copy of this message | ||
Hello,
can you please post a unified diff (diff -u)? That's much more readable.
regards,
Derick
On Mon, 4 Mar 2002, 'Ricky' S Dhatt wrote:
> Hi -
>
> I'd like to ask that the pcre_match*() functions be modified such that
> they can also return position info on where the match(s) occured, akin to
> Perl's pos(). I think this would be a very useful addition, plus it
> requires minimal code changes since the actual function, php_pcre_match()
> computes the values presently but just throws them away.
>
> I've modified my own build to do this, and I've attached a diff...but I'd
> regard this as proof-of-concept code since I did it in a hurry (so maybe
> it can make 4.2.0?) and I haven't coded in C since my university classes
> couple years back. It's actually kinda of embarassing, but heck I don't
> know any of you. =P.
>
> The only really difficulty would be deciding how to return the
> values...I've thought up a bunch of ways of implementing this
> other than the stupidly simple add another nested array I did, like use a
> resource, a new function, return a 2nd array, etc.
>
>
> --Ricky
>