Skip to content

Add re_interpolate groups()#516

Merged
katef merged 14 commits into
mainfrom
kate/interpolate_groups
Jan 27, 2026
Merged

Add re_interpolate groups()#516
katef merged 14 commits into
mainfrom
kate/interpolate_groups

Conversation

@katef
Copy link
Copy Markdown
Owner

@katef katef commented Jan 26, 2026

This renders out a simple format string with escapes that hopefully suit group capture.

We don't have group capture, but it seems topical for the library.

As usual I've deferred any decisions to the caller. In particular I kept group0 passed separately because I don't want to require someone to construct an array containing that element prefixed to an existing array of captured values.

Comment thread include/re/groups.h
Comment thread include/re/groups.h Outdated
Comment thread include/re/groups.h
* re_interpolate_groups() ahead of time with groupc = 0
* and passing a non-NULL nonexistent value.
*
* The output string will always be less than or equal in
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can’t be true, right?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I forgot half my sentence

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

@silentbicycle silentbicycle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@katef katef merged commit a1526ab into main Jan 27, 2026
346 checks passed
@katef katef deleted the kate/interpolate_groups branch January 27, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants