import re

xs = [
    re.search(r"[0-9]+", "abc123def45gh987zy").group(0),
    re.findall(r"[0-9]+", "abc123def45gh987zy"),
    re.findall(r"[fb]ar", "foo bar baz far faz"),
    re.findall(r"((foo).*(bar))", "fofoofabarba"),
    re.match(r"bar", "foobar"),
    re.match(r".*bar", "foobar").group(0),
]
print(*xs, sep='\n')

license = "ABC-123"
full, lpart, npart = re.match(r"((\w\w\w)-(\d\d\d))", license).groups()
print("The plate", full, "has number part", npart)