brandon1024 / find

A find-in-page extension for Chrome and Firefox that supports regular expressions.
https://chrome.google.com/webstore/detail/find%2B-regex-find-in-page/fddffkdncgkkdjobemgbpojjeffmmofb
GNU General Public License v3.0
413 stars 54 forks source link

Incorrect regex in the User Guide #375

Closed michaelts1 closed 2 years ago

michaelts1 commented 2 years ago

Issue Description

In the "User Guide" page that opens after installing the extension, it says:

Find+ supports any regular expression supported by JavaScript ... The following example matches any quoted date with the format "####-##-##".

"\d{4}-\d{2}-\d{d}"

However, {d} is not a valid quantifier in JavaScript, and is interpreted as the literal string "{d}". For example, the above regex will match "2012-10-1{d}", but not "2012-10-17". I assume that this is a mistake and the intended text was "\d{4}-\d{2}-\d{2}", and will be happy to send a PR if this is actually the case.

Steps to Reproduce

Screenshots and Documentation

Screenshot_1 You can confirm this is incorrect by going to https://regexr.com/6fb4h

brandon1024 commented 2 years ago

Ahh yes, you're correct. Good catch! If you want to submit a PR, I will happily merge :-)