I’ve been trying to challenge myself to learn regex for fun and also because regular expressions are so useful but I can’t seem to get one of the codecademy exercises right despite multiple attempts. The task is to find a regular expression that validates that a string starts with “a”, ends in “z” and contains an indeterminate quantity of characters between “b” and “y”.

This is the closest I’ve gotten:


Any ideas what’s missing?

This one works in testing, but without a link to the lesson cannot be tested there.


What you might be looking for?