i

Python Programming

Matching or Searching

The python offers two different primitive operations based on the regular expressions: match checks for match only at beginning of the string, while search checks for match anywhere in  string.

Example

Live Demo

Output:

No match!!

search --> search.group() :  dogs