gskinner / regexr

RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.
http://regexr.com/
GNU General Public License v3.0
9.89k stars 973 forks source link

Wrong explanation for dot character class #423

Open mumbomedia opened 3 years ago

mumbomedia commented 3 years ago

Screenshot 2021-07-08 at 08-53-34 RegExr Learn, Build, Test RegEx

As you can see from the screenshot, when using the dot character class the text shown in the Tools section is wrong. . Matches any character except linebreaks. Equivalent to [^\n\r]. So the text "Dot. Matches any character including line brea... is definitly wrong. Instead of including is has to be except.

gskinner commented 3 years ago

This is because you have the s (aka dotall) flag enabled, which allows . to match line breaks. The dynamic hints recognize that, but the documentation is static. We should add a note about dotall to the docs though.