Skip to content
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

Regex example is incorrect #36

Open
Fryguy opened this issue Apr 19, 2022 · 1 comment
Open

Regex example is incorrect #36

Fryguy opened this issue Apr 19, 2022 · 1 comment

Comments

@Fryguy
Copy link
Contributor

Fryguy commented Apr 19, 2022

The following line is not exactly accurate:

So, the regex pattern "a*b*x" describes a pattern of 0 or more a’s, followed by 0 or more b’s, followed by x. This pattern matches strings like "aabx", "bbbx", and "abx", but not "bax" or "aabb".

However, a*b*x does match bax (ref). Admittedly it doesn't match the entire string, but the previous paragraph talks about how matches happen on any part of the string, so it's confusing.

david-a-wheeler added a commit that referenced this issue Oct 11, 2022
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
@david-a-wheeler
Copy link
Contributor

Whups, you're right. Let's just remove the "bax" example.

david-a-wheeler added a commit that referenced this issue Oct 11, 2022
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
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