[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A function to take the regexp-matched subsring directly
From: |
Philip Kaludercic |
Subject: |
Re: A function to take the regexp-matched subsring directly |
Date: |
Sun, 30 Oct 2022 15:45:23 +0000 |
daanturo <daanturo@gmail.com> writes:
> How do you think about such a built-in functionality?
>
> I find myself using them in parsing strings alot, most of the time I
> just care about whether a particular matched (sub-)expression or not:
> Does it match? Yes? Good, throw me result, else give me null.
Is there a reason you find yourself working with strings as opposed to
buffers? I've seen people try to force functional paradigms on Emacs
when they do stuff like creating a list of lines in a buffer then
iterating over these instead of using the (faster) buffer searching
mechanisms. My worry is that functions like these, while useful per se,
might make more people inclined to write unideomatic and wasteful code.
> The implementation is attached. I name it 'regexp-match' (please
> change the name if needed).