Regex documentation bug Topic is solved

Share your ideas as to how the documentation can be improved.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Regex documentation bug

Post by malcev » 20 Jan 2020, 16:41

By default, a dot matches any single character which is not part of a newline (`r`n) sequence, but this can be changed
https://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm
It is not true:

Code: Select all

msgbox % RegexMatch("`r`n", ".\n")
msgbox % RegexMatch("`r`n", "\r.")
When a line ending is defined as a single character, dot never matches
that character; when the two-character sequence CRLF is used, dot does
not match CR if it is immediately followed by LF, but otherwise it
matches all characters (including isolated CRs and LFs). When any Uni-
code line endings are being recognized, dot does not match CR or LF or
any of the other line ending characters.
http://www.pcre.org/pcre.txt

guest3456
Posts: 3465
Joined: 09 Oct 2013, 10:31

Re: Regex documentation bug

Post by guest3456 » 20 Jan 2020, 21:43

how do you suggest the docs should be worded instead?


malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Regex documentation bug

Post by malcev » 20 Jan 2020, 21:52

For example:
By default, a dot matches any single character except "`r" if it is immediately followed by "`n".
Or
By default, a dot matches any single character except "`r" in a newline (`r`n) sequence.


User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Regex documentation bug

Post by nnnik » 21 Jan 2020, 07:54

Its not a bug though - its just a suggestion for documentation improvements.
Therefore it will be moved to the correct forums.
Recommends AHK Studio

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Regex documentation bug

Post by malcev » 21 Jan 2020, 09:33

I think that it is bug - error in documentation and therefore the place for that topic I chose correctly.
Bug Reports
Report problems with documented functionality
It is not suggestion about documentation improvement, it is report about problem with documented functionality.

User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Regex documentation bug

Post by nnnik » 21 Jan 2020, 13:31

Bug reports is only for errors in AHK itself - as in when the documentation is correct but AHK doesnt follow it.
When the documentation is not correct just put it into this forum.
Recommends AHK Studio

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Regex documentation bug

Post by malcev » 21 Jan 2020, 13:53

Ok, Got it!

Post Reply

Return to “Suggestions on Documentation Improvements”