Hello, in this python programming tutorial, we are going to look at the search function. So, the search function pretty simple to match the search just go through it until you find the first instance of whereas match only checks if it is at the start of the characters provided even though you can set an offset, it still will only do it from so like one will essentially get rid of know that for example, obviously, you will get rid of that in in the inner work and do the start here and then he will look for he out. But if we didn't pay or if he started here, and he was here, and he wouldn't work, whereas we search, you just keep going through it till he actually finds it or if it doesn't find it. So we'll keep the compile and searching really simple. It's just search And it's two two.
So if I rerun it, see what we get? So I didn't seem got non match, which is this one, then we got a match, because we're at the start. So first one doesn't give me Okay, the second one does, then it's out. So match. Then the third one, we start here. The first case the next is our cow match.
The final one. We start over here for the first letter ignore knee. And so we keep going till we get to an A Nope, no other than these no way we can continue to see if he is, you know, is a match, but you know, successfully searched for in our little string. So that's it for the search method. As I mentioned in the match method, you can further advance these regular expressions and I'm gonna put a link in description to Be able to create your own patterns and add an extra task. Have a go at doing that.
But that's really it for match and searching the core essence the differences between the fans watching. I look forward to seeing you in the next video.