r/madeinpython • • Jun 21 '21

Explanation of Regex function using python | Animation created using Python Manim library

https://youtu.be/E5ZvK66R4Ks
30 Upvotes

3 comments sorted by

1

u/jampk24 Jun 21 '21

Maybe I’m misunderstanding, but it seems like some of these aren’t clear on what they do or why you’d use them. I don’t understand what the pipe does because it seems like it wasn’t really demonstrated. Is it like an “else” i.e. search the string for “forged” and if you can’t find it then search for “clean”? What’s the point of match() if you can use a ^ to search the beginning of a string? What’s the point of doing re.compile() and then pattern.search() if you can combine those into a single re.search() function call?

0

u/restinworld Jun 21 '21

in this video, i have tried to explain about, how different methods of re library work on string. I have also used few metacharacters, anchors and quantifiers.

Please consider this video as beginners level explanation.

Yes, it would be a better video, if i have explained about, why we require these methods. how one method of re are different from others.

but to avoid any confusion and to make this video as beginners friendly i have choose not to include these explanation.

i hope you will understand my view.

3

u/wickeddawg Jun 21 '21

thanks for the share, added to my playlist to watch later on