-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fr] More than 9 capture groups? #369
Comments
It's not a silly question at all! In fact, I seem to remember that Einar and I once discussed it here on GitHub, or I meant to discuss it with him (I no longer remember, but you can search and refresh my memory if you feel like it!). Going through all my Redirector rules, I see that I wrote a rule that goes all the way up to the 9th regex capture group, and would benefit form more capture groups. That likely means that I did not find a way to go beyond 9 capture groups in Redirector (at least when I wrote that rule, and I think I wrote that rule about 2 years ago). |
@Rhys-T Thank you. I've added it to my list to include in the next release. |
@Eugenekoh12 Here are a couple of workarounds you might be able to use for now, until that fix gets released:
I'm not sure what you're doing that involves that many capturing groups, so I'm not sure how to give concrete examples of how to apply either of those approaches. Footnotes
|
@Rhys-T The first point you wrote definitely works, as it is included in the regex standard we use. It also has the benefit of using less memory, as less data needs to be stored internally. But regarding the second point, are you sure that works? I definitely think we should make it work, but I'm pretty sure Redirector doesn't currently process its own output. I'm pressed for time right now, but there is the issue you found (#152), and perhaps another one on the topic. |
…huh. I could have sworn that was working. I have a rule set up to redirect Medium articles to https://scribe.rip, and another rule (earlier in the list) that fixes the result up when it ends up at Footnotes
|
@Rhys-T No problem at all. Historically, I encountered a similar situation, but I couldn't reproduce it either. If you ever are able to generate a situation that shows both of us to be mistaken, please educate us both on how you do it. :) I say that smiling due to the (hopefully) obvious humour, but I'm actually quite interested. |
See also #302 |
Is it possible to have more than 9 capture groups and use them in the resulting replaced url?
I tried to use $10 and above and it results in the first capture group results and a 0 behind it so I'm not sure if I'm just not getting something. Sorry if this is a silly question.
The text was updated successfully, but these errors were encountered: