Skip to content
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: Provide a way to use RegExp rules instead of wildcard ones #35

Closed
Drugoy opened this issue Jul 29, 2017 · 4 comments
Closed

FR: Provide a way to use RegExp rules instead of wildcard ones #35

Drugoy opened this issue Jul 29, 2017 · 4 comments
Labels

Comments

@Drugoy
Copy link

Drugoy commented Jul 29, 2017

Feature request:
Please, add support of regex rules like the Redirector has.

@tumpio
Copy link
Owner

tumpio commented Jul 29, 2017

Can you give me some information what this feature request would solve? Where would you specifically need support for regular expression?

In general, matching using regexp is slow. RC currently only supports using plain Match patterns (that is the pattern scheme for the background webRequest API).

@tumpio tumpio added the feature label Jul 29, 2017
@Drugoy
Copy link
Author

Drugoy commented Jul 29, 2017

Can you give me some information what this feature request would solve? Where would you specifically need support for regular expression?

Sometimes I need to reference some sub-string from the value of the parameter and reference to it (re-use it in the 'redirect to' URL).
Your add-on only provides referencing to the whole value of the named parameter and optionally a substring from it using a fixed length offset, while I might need an offset of the various length.

I know that regex is slow, so it would be awesome if you added it to the currently available type of patterns, not replaced them.

Ideally would be if you would modify the the current GUI in such a way:

  1. The user decides whether he wants the input URL pattern to be treated as a single piece, like this:

or whether it should be chopped into parts like it is currently done in your add-on:

  1. For each of the input field the user would choose type of pattern to use: regexp or wildcard.

  2. Both types of patterns would provide referable capture groups, so that captured strings could be reused in the output URL.

@Drugoy
Copy link
Author

Drugoy commented Aug 15, 2017

Now that you've shown in issue 34 how to do that (tricky, but at least it's possible!) - I guess this issue can also be closed.

@Drugoy Drugoy closed this as completed Aug 15, 2017
@Drugoy
Copy link
Author

Drugoy commented Aug 15, 2017

p.s.: feel free to re-open issues 34 and 35 if you'd like to improve the UI or something.

Repository owner locked and limited conversation to collaborators Nov 26, 2017
@tumpio tumpio removed the help wanted label Jan 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants