[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modern regexes in emacs

From: Clément Pit-Claudel
Subject: Re: modern regexes in emacs
Date: Fri, 15 Feb 2019 10:13:41 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 15/02/2019 10.03, Philippe Vaucher wrote:
> Given this I'm in favor of the 2nd option, but maybe I missed some points.

Thinking more about this, there is one non-trivial issue: concatenation.  It's 
common for code in Emacs to take a regexp, assume it's a string, and do 
something like (concat "\\(" some-regexp-var "\\|" some-other-regexp-var "\\)").

Solution 1 could be tweaked to wrap the whole regexp: "\\(?pcre:…[pcre regexp 
here]…\\)", and so could solution 3 (a text property spanning the whole length 
of the string), but solution 2 won't work well here.

Not to mention the fact that if the regexps are matched by different engines, 
we now have to make these work together :/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]