From cyc||cgroup-z1 @end|ng |rom y@hoo@com  Fri Aug 30 00:26:57 2019
From: cyc||cgroup-z1 @end|ng |rom y@hoo@com (Cyclic Group Z_1)
Date: Thu, 29 Aug 2019 22:26:57 +0000 (UTC)
Subject: [Rd] Feature request: non-dropping regmatches/strextract
In-Reply-To: <CAOQ5NydKtocPcz-3zVfZMo5K0jkbsF+R2iBvzzPO7fiP=+ZHQg@mail.gmail.com>
References: <2012653205.221487.1565848601638.ref@mail.yahoo.com>
 <2012653205.221487.1565848601638@mail.yahoo.com>
 <CALK03d2cCoAboDBmr5dhR9+kjGh5=Eg5QAHmKc-qJYm_iGO5mw@mail.gmail.com>
 <102772513.32513.1567113562904@mail.yahoo.com>
 <CAOQ5NydKtocPcz-3zVfZMo5K0jkbsF+R2iBvzzPO7fiP=+ZHQg@mail.gmail.com>
Message-ID: <1828482902.51488.1567117617120@mail.yahoo.com>

Thank you! I greatly appreciate your consideration, though of course it is up to you. I think many people switch to stringr/stringi simply because functions in those packages have some consistent design choices, for example, they do not drop empty/missing matches, which facilitates array-based programming. For example, in the cases where one needs to make a new column in a data.frame (data.table, tibble, etc.) of regex extractions. Or in any other case where there needs to be an element-wise correspondence between input and output. I think insertion of NA_character_ to prevent dropping indices seems like the natural choice for an array language (which, I think, motivated the creation of stringr/stringi). While those are great packages and this behavior can be easily replicated with simple wrappers, string operations are normally easy to accomplish in base languages, so this seems like something that would be appropriate to have in base. For example, MATLAB and Pandas regex both allow non-dropping empty matches (though of course I acknowledge Pandas is not a base language).

Best,
CG



[Rd] Feature request: non-dropping regmatches/strextract
Cyclic Group Z_1