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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Daniel Petrov](https://uploads.teamtreehouse.com/production/profile-photos/5539002/micro_Daniel_LocalSolo.jpg)
Daniel Petrov
3,495 PointsSame results
Skipping the second and fourth lines brings the same results. Why would we use them? @Keneth Love
![Daniel Petrov](https://uploads.teamtreehouse.com/production/profile-photos/5539002/micro_Daniel_LocalSolo.jpg)
Daniel Petrov
3,495 PointsThanks Steven
3 Answers
![Kenneth Love](https://uploads.teamtreehouse.com/production/profile-photos/710512/micro_TeacherShoot-Kenneth.jpg)
Kenneth Love
Treehouse Guest TeacherHmm, OK. That's totally possible! But why have those lines? Well, partly for explicitness (especially line 3) and partly for clean data (line 5).
If, somehow, I had a string like hello-there,what-is-happening
, I wouldn't necessarily want it to match. The regex would prevent that because there's no whitespace after the comma. Also, if a line does end with a tab or newline, I don't want that tab or newline to be included in my results because they're not useful characters.
![Daniel Petrov](https://uploads.teamtreehouse.com/production/profile-photos/5539002/micro_Daniel_LocalSolo.jpg)
Daniel Petrov
3,495 PointsYes, that makes sense! Thanks!
![Kenneth Love](https://uploads.teamtreehouse.com/production/profile-photos/710512/micro_TeacherShoot-Kenneth.jpg)
Kenneth Love
Treehouse Guest TeacherI'm not sure exactly what you mean by "second and fourth lines". Can you show me an example?
![Daniel Petrov](https://uploads.teamtreehouse.com/production/profile-photos/5539002/micro_Daniel_LocalSolo.jpg)
Daniel Petrov
3,495 PointsSorry my bad, it is actually 3 and 5. I am getting the same result with and without these two lines.
print(re.findall(re'''
\b[-\w]+,
\s <---
[-\w ]+
[^\t\n] <---
''', data, re.X))
Steven Parker
230,688 PointsSteven Parker
230,688 PointsIt doesn't look like your tag for Kenneth Love was correctly converted into a link. This one should work.
And I don't know which "lines" you are referring to, but perhaps he will.