Req #34121 [Fbk->NoF]: Add DFA support to preg_match() function

From: Date: Sun, 12 Sep 2021 04:22:07 +0000
Subject: Req #34121 [Fbk->NoF]: Add DFA support to preg_match() function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236545@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=34121&edit=1 ID: 34121 Updated by: php-bugs@lists.php.net Reported by: nlopess@php.net Summary: Add DFA support to preg_match() function -Status: Feedback +Status: No Feedback Type: Feature/Change Request Package: PCRE related Operating System: * PHP Version: * Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-08-31 09:35:36] cmb@php.net That might be an interesting feature, but the patch is no longer available (and likely went stale in the meantime). If you're still interested in DFA matching, please provide a pull request[1]. [1] <https://github.com/php/php-src/pulls> ------------------------------------------------------------------------ [2005-08-15 20:52:09] nlopess@php.net OK, patch revised. I've added support for partial matching. This can be usefull, for example, in a CLI app to beep when a user enters a bad char (by doing partial matching when a new char comes in). TODO: make preg_match_all() fetch all the data (instead of the hardcoded limit). this may be tricky. ------------------------------------------------------------------------ [2005-08-13 14:21:46] nlopess@php.net Assigning to Andrei, as he's the PCRE extension maintainter. ------------------------------------------------------------------------ [2005-08-13 14:20:51] nlopess@php.net Description: ------------ I've made a patch to add DFA (PCRE 6) support to preg_match(). It isn't completed (yet), because I would like to receive your feedback first before continuing. patch: http://mega.ist.utl.pt/~ncpl/php_pcre_dfa.txt example: http://mega.ist.utl.pt/~ncpl/dfa_example.php TODO: - currently preg_match_*() allocs memory for captures based on the number of capturing parentheses. But this needs to be changed for the DFA mode. - make partial matching working. The only thing it needs to be done is to save the workspace table in the cache and reuse it when calling the pcre_dfa_exec() function. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=34121&edit=1

« previous php.bugs (#236545) next »