secondlife / jira-archive

2 stars 0 forks source link

[BUG-233803] LSL: Add llLinksetDataDelete and llLinksetDataCountKeys functions working with regular expression pattern #10839

Closed sl-service-account closed 8 months ago

sl-service-account commented 1 year ago

How would you like the feature to work?

llLinksetDataDelete, llLinksetDataDeleteProtected and llLinksetDataCountKeys functions would accept a regular expression as the llLinksetDataFindKeys fucntion does.

Why is this feature important to you? How would it benefit the community?

It would be very useful to have the possibility to use the llLinksetDataDelete, llLinksetDataDeleteProtected and llLinksetDataCountKeys functions without having first to retrieve the list of keys.

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-233803 | | Summary | LSL: Add llLinksetDataDelete and llLinksetDataCountKeys functions working with regular expression pattern | | Type | New Feature Request | | Priority | Unset | | Status | Closed | | Resolution | Duplicate | | Reporter | Gael Streeter (gael.streeter) | | Created at | 2023-04-25T15:24:41Z | | Updated at | 2023-04-26T18:09:02Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2023-04-26T05:46:51.537-0500', 'How would you like the feature to work?': 'llLinksetDataDelete, llLinksetDataDeleteProtected and llLinksetDataCountKeys functions would accept a regular expression as the llLinksetDataFindKeys fucntion does.', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'Why is this feature important to you? How would it benefit the community?': 'It would be very useful to have the possibility to use the llLinksetDataDelete, llLinksetDataDeleteProtected and llLinksetDataCountKeys functions without having first to retrieve the list of keys.', } ```
sl-service-account commented 1 year ago

JIRAUSER341305 commented at 2023-04-26T10:46:52Z

Every new string searching function should be implemented with BUG-233078 in mind.  It's even flexible enough to start off as a thin shim over regex as the underlying implementation (the most complicated part is regex-escaping the input string for the non-regex matches), and simply passing MATCH_REGEX removes it for use with a regex-builder function for more complex use cases.

Also, we do at least need llRegexEscape(pattern), or, something like llMakeRegex(pattern, MATCH_EXACT) — there still exists the problem of less experienced scripters passing unfettered user input directly through as the regex pattern.  At the very least, BUG-233078 also forces the scripter to acknowledge that it is a regex they're applying (and hopefully encouraging them to consider the issues with doing so), and provides a simple on-ramp for people who haven't yet gotten down with the wonders that is regex and simply want a simple case-insensitive string suffix match.  And lastly, reverse matching is still an awesome feature that I would dearly love to see implemented.