Why is '^' said to match the first occurence of a string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why is '^' said to match the first occurence of a string?

I don't understand, can someone help!

22nd Mar 2019, 11:25 AM
Thimira Rathnayake
Thimira Rathnayake - avatar
2 Answers
+ 10
This link seems helpful for understanding Python's regex first occurence matching in a string using ^ https://superuser.com/questions/266732/matching-only-the-first-occurrence-in-a-line-with-regex
23rd Mar 2019, 2:28 AM
boneSpider
boneSpider - avatar
+ 1
Thanks @boneSpider
23rd Mar 2019, 12:52 PM
Thimira Rathnayake
Thimira Rathnayake - avatar