Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Regex syntax: escape literal \. #7626

Merged
merged 6 commits into from
Mar 18, 2024
Merged

Conversation

katef
Copy link
Contributor

@katef katef commented Mar 13, 2024

Description:

Many regexps here accidentally have unescaped . (meaning to match any character), where they're intended to match a literal dot character. I've made a pass to add these escapes.

I have made no other changes in this PR, to keep the diff clear.

This probably doesn't make much difference for backtracing regex engines, but for DFA-based regexes it helps reduce combinatorial explosions in state machine size.

Review

Copy link
Collaborator

@liviuconcioiu liviuconcioiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @katef!

I've made some suggestions to your changes, because tests don't pass.

See https://github.com/matomo-org/device-detector/actions/runs/8266869828/job/22617112820?pr=7626

@sanchezzzhak sanchezzzhak merged commit dbea31d into matomo-org:master Mar 18, 2024
15 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants