all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Samvid Mistry <mistrysamvid@gmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Regex matching summary blocks in C#
Date: Sun, 03 Dec 2023 19:49:06 +0530	[thread overview]
Message-ID: <m2y1ebs6u7.fsf@gmail.com> (raw)
In-Reply-To: <CAP_d_8UNCS5b6V+K1JwjghDE8hOdy=Nj0peX4G2vZFp39o3Tqg@mail.gmail.com>


Yuri Khan <yuri.v.khan@gmail.com> writes:

>
> You have a *? iterator around your second group, so only one line is
> captured. I’d try making the sub-regex that matches a single line into
> a non-capturing group, then putting a capturing group around the
> iterator:
>
>     \\(\\(?:.*\n\\)*?\\)

IIUC, you are suggesting I do this

"\\(\\s-*\\)///\\s-*<summary>\\s-*\n\\(\\(:?.*\n\\)*?\\)\\s-*///\\s-*</summary>"

That doesn't seem to change anything.

>
> (BTW what is your plan after you get the whole inside of the <summary>
> in a single group? Your description makes it look like you’re going to
> want to do something to display /// as //.)

I'm removing the <(/)summary> tags from view. There are other ceremonies
like documentation for parameters and return values, which I'm
also planning to simplify. It is partly for aesthetics and partly for me
to try my hand at overlays.

-- 
Thanks,
Samvid



  reply	other threads:[~2023-12-03 14:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 12:07 Regex matching summary blocks in C# Samvid Mistry
2023-12-03 13:39 ` Yuri Khan
2023-12-03 14:19   ` Samvid Mistry [this message]
2023-12-03 14:30     ` Yuri Khan
2023-12-03 14:56       ` Samvid Mistry
2023-12-03 15:15         ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y1ebs6u7.fsf@gmail.com \
    --to=mistrysamvid@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.