secure-sw-dev-fundamentals
secure-sw-dev-fundamentals copied to clipboard
Regex example is incorrect
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.
Whups, you're right. Let's just remove the "bax" example.