ossf / secure-sw-dev-fundamentals

Secure Software Development Fundamentals courses (from the OpenSSF Best Practices WG)
Creative Commons Attribution 4.0 International
182 stars 46 forks source link

Regex example is incorrect #36

Open Fryguy opened 2 years ago

Fryguy commented 2 years ago

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 commented 2 years ago

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