Page MenuHomeFeedback Tracker

[Feature Request] New parameter for regexFind to return empty capture group results
New, NormalPublic

Description

Currently when you use capture groups, only the ones that were found are shown in the result, and others are omitted. So it's hard to tell which capture group something belongs to without doing a regexMatch again, which could probably be slower

"abc" regexFind ["(d)|(b)|(c)", 0];
// sample return
[[["b", 1],["b", 1]],...]

so having a new optional parameter that returns all capture group results (empty ones as []) is useful:

"abc" regexFind ["(d)|(b)|(c)", 0, true];
// sample return
[[["b", 1], [], ["b", 1], []],...]

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 created this task.Sep 1 2021, 2:44 PM