DEV Community

Discussion on: Regular Expressions(RegEx) in Python

Collapse
 
codebalance profile image
Kat 🐆🐾 • Edited

Hey! I love your post, it's very helpful!

I just wanted to point out that there are some "bugs" in your documentation that confused me at first, e.g. in this code block:

# replacing match using search and ^
import re
s1='China is the most populous country in the world'
s2='Most populous country in the world is China'
res=re.search(r'China$',s1)
print(res) #prints Match object as China is at the beginning of s2.
res=re.search(r'China$',s2)
print(res) #prints None as China is not at the beginning of s2.
Enter fullscreen mode Exit fullscreen mode

(I don't mean to complain, just help make your blog post "flawless" cause I find it really helpful!)

Collapse
 
shunya_ek profile image
Zero | One

Thank you so much for reading the article and pointing my mistakes to me. It really means a lot to me. As it was written in one sitting, possibilities are there might be more mistakes. If you or anyone finds out, please point out to me. Some of the mistakes have been corrected as pointed out by you.