Skip to content

Line comment bug #155

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

Closed
Adrian-Hawryluk opened this issue Nov 1, 2022 · 2 comments
Closed

Line comment bug #155

Adrian-Hawryluk opened this issue Nov 1, 2022 · 2 comments

Comments

@Adrian-Hawryluk
Copy link

Adrian-Hawryluk commented Nov 1, 2022

So I was making a big ass regex for use in AHK and it wasn't working. Seems that the line comment (# ...) has a bug. Using the x mode with LFs as a EOL marker, this regex worked:

	a
	# comment before error
	(

When obviously it should have had a parse error. Changing the EOL line marker to CRLF did seem to resolve the issue as did converting the line comment to an embedded ((?# ...)) comment.

According to the ahk change log, it's using version 8.30 (search for text PCRE).

@PhilipHazel
Copy link
Collaborator

I don't know what AHK is, but if it's using 8.30 it is relying on an unmaintained, obsolete PCRE1 release that was released in 2012. The final PCRE1 release is 8.45 (2021) - there is no more maintenance. PCRE development is now entirely on PCRE2, so we need evidence of something not working in PCRE2 (current release 10.40), preferably as a regex/subject pair that doesn't do what you expect, before any investigation of a possible bug will happen. (Even more preferably as a pcre2test input file.)

@Adrian-Hawryluk
Copy link
Author

Adrian-Hawryluk commented Nov 13, 2022

Never mind. It was explained to me that the switch to set what pcre uses to match a newline actually also affects the regex itself. It is apparently not so much of a bug but a feature. 🙄

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

2 participants