emacs-devel
[Top][All Lists]
Advanced

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

Re: icalendar.el bug fix patch


From: Juri Linkov
Subject: Re: icalendar.el bug fix patch
Date: Sat, 02 Nov 2019 20:39:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>> you would have to write "\\(?:.\\|\n\\)" which is slower and messier, 
>>> although perhaps easier to understand.
>> Yes, it's easier to understand, so I prefer that we use it.
>
> I find "[^z-a]" to be signficantly easier to understand than
> "\\(?:.\\|\n\\)".
>
> But since the concept is useful, how about if we create an escape for it?
> For example, we could establish \! as a regexp that matches any single
> character. This be more readable than either [^z-a] or \(?:.\|
> \), and would surely help performance as well as readability.

Like using the dotall modifier in other regexp engines to enable single line
mode where the dot matches all characters, including newlines, e.g. in PCRE

  /regexp/s

what would be an equivalent for specifying regexp modifiers in Emacs Lisp?
Maybe something like

  (let ((regexp-modifiers "s"))
    (string-match "." string))



reply via email to

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