-
Notifications
You must be signed in to change notification settings - Fork 68
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
Dynamic regex match #12
Comments
@Roycohen It cannot be done in the current implementation though it's certainly possible to modify the current code base to support this. I think your configuration does not quite do what you want. It seems that you really need this instead (untested, of course): replace_filter "\[(AV_[A-Z]+)\]" "${arg_$1}" g; You'll need to call Patches welcome :) |
OK @agentzh, |
@Roycohen You need to patch the |
Hi There,
Is it possible to implement dynamic variables after matching a string.
I'll explain: I need to replace a know regex but the value that I need to change is dynamic and comes from the regex.
Example:
replace_filter "[(AV_.*?)]" '${arg_AV_$0}' g;
The above should find all matching regexes for [AV__] and replace it form the nginx arg_AV__.
If, I find [AV_STAT] in the body then it should change it from the {arg_AV_STAT}. And if I have another [AV_DEFINE] then the value should be taken from the {arg_AV_DEFINE}.
I hope I make my self clear.
Is there a way that this supported, and if not can you please guide me where to look in your code or or whether it is possible to modify your code and implement it?
BR,
Roy
The text was updated successfully, but these errors were encountered: