[Top][All Lists]

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

Re: Regex matching summary blocks in C#

From: Samvid Mistry
Subject: Re: Regex matching summary blocks in C#
Date: Sun, 03 Dec 2023 20:26:51 +0530
User-agent: mu4e 1.10.7; emacs 29.1

Yuri Khan <> writes:

> On Sun, 3 Dec 2023 at 21:23, Samvid Mistry <> wrote:
>> >     \\(\\(?:.*\n\\)*?\\)
>> IIUC, you are suggesting I do this
>> "\\(\\s-*\\)///\\s-*<summary>\\s-*\n\\(\\(:?.*\n\\)*?\\)\\s-*///\\s-*</summary>"
> \\(?:, not \\(:? . The former marks the group as non-capturing. The
> latter introduces a capturing group starting with a colon.

That was my bad. Your expression seems to have worked. Thanks!

Would you mind expaining a bit about why it works? Per my current
understanding, both mine and yours should have the same net effect,
except that marking the inner group non-capturing should make the regex
evaluation a bit faster because emacs need not remember the matched
text. But clearly, my understanding isn't correct.


reply via email to

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