DEV Community

Discussion on: A Visual Guide to Regular Expression

Collapse
 
kmonsoor profile image
Khaled Monsoor • Edited

hey @amitness cool guide for difficult stuff like RegEx. 👏

I think you got a typo in the 2nd last example.
Why should "r'batman'" in

match = re.match(r'batman', 'The batman is cool')

should match only match for the occurrence at the beginning?

Collapse
 
ardunster profile image
Anna R Dunster

re.match() and re.search() work differently: stackoverflow.com/questions/180986...