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

Problems using $ in regexp templates #50

Open
volgaleoking opened this issue Jul 25, 2024 · 0 comments
Open

Problems using $ in regexp templates #50

volgaleoking opened this issue Jul 25, 2024 · 0 comments

Comments

@volgaleoking
Copy link

volgaleoking commented Jul 25, 2024

Previously, the configuration in nginx 1.22.0 was used with the lines:

subs_filter '?t=$Time$' g;
subs_filter '#EXT-X-MEDIA.+TYPE=SUBTITLES.+\n$' rg;

but when switching to nginx version 1.26.1, errors began to appear as follows:
nginx: [emerg] invalid variable name in /etc/nginx/...
and
nginx: [emerg] match part cannot contain variable during regex made in /etc/nginx/...
in the process of studying the problem, it was revealed that the $ symbol was to blame, but any attempts at escaping did not lead to success.
Only after changing regexp templates:

subs_filter '\?t=.Time.' rg;
subs_filter '#EXT-X-MEDIA.+TYPE=SUBTITLES.+\n' rg;

the configuration was started successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant