Skip to content

Comments

Make regexps more strict and refuse trailing newlines#16

Merged
tvdijen merged 2 commits intomasterfrom
bugfix/regexp-not-ending-with-newline
Nov 19, 2024
Merged

Make regexps more strict and refuse trailing newlines#16
tvdijen merged 2 commits intomasterfrom
bugfix/regexp-not-ending-with-newline

Conversation

@tvdijen
Copy link
Member

@tvdijen tvdijen commented Nov 19, 2024

To prevent false positives, we can make use of the PCRE_DOLLAR_ENDONLY flag (D) that will constraint the $ anchor to match the end of the string only, not a newline character.

@tvdijen tvdijen requested a review from jaimeperez November 19, 2024 17:50
@tvdijen tvdijen merged commit 430c152 into master Nov 19, 2024
@tvdijen tvdijen deleted the bugfix/regexp-not-ending-with-newline branch November 19, 2024 18:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants