IanFindlay / automate-the-boring-stuff-projects

My solutions to all of the projects in Automate the Boring Stuff with Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Right Trim for spaces not happening

vidyabhandary opened this issue · comments

commented

In Chapter 7 - regex_strip.py - Line 12, the regex code with (.)*

space_regex = re.compile(r'^(\s*)(.*)(\s)*$')

is not trimming the spaces on the right.

I changed (.)* to (\S*)` instead -

space_regex = re.compile(r'^(\s*)(\S*)(\s*)$')

I try not to update this repo, as it is about what I did when working through AtBS not what I would do now, but people use it for reference and pointing out errors like this is always appreciated. Is it okay with you if I mention your username in the correction commit?

Thanks for taking the time to open an issue and I hope you're doing well with AtBS.

commented

Yes can definitely mention my username. I really like your repo so far. When I get stuck I look at it. So far AtBS is great !

Glad to hear you're enjoying it and that this repo has been useful to you.

Thanks again for raising the issue.