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 trialJimmy Sweeney
5,649 PointsNo offense, Kenneth, but this is not good instruction.
These videos need to be updated. Please break it down further. The instructor needs to isolate the variables more. I find myself having no idea how or why these regular expressions are working. I would suggest starting with a much simpler .txt file and going through the instructions with much more explicit explanation. For example, what do the $ and ^ do? Show examples of changing one thing at a time instead of writing a whole line of code then saying "look it worked, that's neat". Please explain why it worked!
Sorry for the rambling, but this is frustrating.
2 Answers
Zimri Leijen
11,835 Pointsregexr.com is a useful tool to break down regex and use it in a sandbox.
^ and $ could mark the beginning and the end of a search pattern, by the way.
Ripudaman Singh
317 PointsI TOTALLY AGREE Jimmy Sweeney
Jimmy Sweeney
5,649 PointsJimmy Sweeney
5,649 PointsThanks Zimri. That website is definitely useful.
I still don't understand what ^ and $ mean really but I'm sure I'll figure it out at some point.
Jimmy Sweeney
5,649 PointsJimmy Sweeney
5,649 PointsI also found this site: https://regex101.com/
You can choose Python as the programming flavor. Just fiddling around with these sandboxes turned out to be the key for me understanding all of this. Thanks again, Zimri.
justlevy
6,325 Pointsjustlevy
6,325 PointsGood resource Zimri Leijen
Should we select JavaScript RegExp or PCRE via PHP if we're learning Python? Probably PCRE since it's server side and closer to PERL?