Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialkaran Badhwar
Web Development Techdegree Graduate 18,135 Points^[a-z]+$
Why is this working, if I put abcDefg, the tool tip is still there, but as per the code I understood, while writing abcD 'D' was once at the end, but then we overwrite it with efg why the tool tip is still there?
1 Answer
Rohald van Merode
Treehouse StaffHi karan karan,
That happens because of the $
at the end of your RegEx. This indicates that the string has to finish with the part in front of it. Which is in this case is lowercased letters. Since you're using both the ^
and $
here and there's nothing else in between other than the lowercased letters it will only pass when the string both starts and ends with lowercased letters.
Hope this helps 🙂
karan Badhwar
Web Development Techdegree Graduate 18,135 Pointskaran Badhwar
Web Development Techdegree Graduate 18,135 PointsHey Rohald van Merode, thankyou for your response, I got it