Python Resource Additions
holypython opened this issue · 1 comments
Hi,
We wanted to make some additions to your curated Python resources list as we believe some of our content would compliment your list well. Would you be interested in such a contribution? Thanks!
I did glance through your regex lesson, but I didn't like a few things (examples given below) so I decided not to add your links.
What if you also need capital letters as you normally would? Simple: Just type:
[a-z][A-Z]
Why not [a-zA-Z]
? Your description doesn't say whether you want to match either case or lowercase followed by uppercase.
If you just type a regex expression as below you will only get the characters inside the brackets:
[abcde]0
There's no explanation why 0
is there, perhaps a typo?
\w
:will show word-class (This means alphanumerical characters.).
Although you mention underscore in the explanation below, you should also correctly specify it in the above description too.
If you tried to rename a file recently, you may recognize that only alphanumeric characters are allowed while naming a file in the computer.
That depends on the OS and filesystem, and generally lot more characters are allowed. See https://stackoverflow.com/questions/4814040/allowed-characters-in-filename for more details.
.
: dot will capture any character there is.
No, newline won't be matched unless you use re.DOTALL
flag. And it won't work on characters with multiple codepoints, for example try out re.sub(r'a.e', 'X', 'cag̈ed')