secure-sw-dev-fundamentals icon indicating copy to clipboard operation
secure-sw-dev-fundamentals copied to clipboard

Regex example is incorrect

Open Fryguy opened this issue 3 years ago • 1 comments

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.

Fryguy avatar Apr 19 '22 21:04 Fryguy

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

david-a-wheeler avatar Oct 11 '22 15:10 david-a-wheeler