Extension talk:RegexFunctions
![]() Archives
| ||
---|---|---|
| ||
Would be awesome if there was an {{#rswitch:}}
I'm thinking of something like this:
{{#rswitch: STRING | REGEX_1 = RESULT_1 | REGEX_2 = RESULT_2 ... }}
Should be pretty self-explanatory what it's meant to do. The result parts should be able to reference capture groups. Basically, it would be like a bunch of nested rmatch:
usages.
(Copied this from the archive because I think it's a wonderful idea. Hope nobody minds. I might try to implement it myself if I find the time.) TaylanKammer (talk) 09:44, 31 March 2025 (UTC)