Skip to content

Dynamic regex match #12

@Roycohen

Description

@Roycohen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions