RegexDump/alexeykaz
RegexDump/Tyapkins
n1from re import searchn1import re
22
n3regex = input()n3reqex = input()
4string = input()4word = input()
5while string:5while (word):
6    found = search(regex, string)6    result = re.search(reqex, word)
7    if found:7    if (result):
8        print("{}: {}".format(found.start(), found.group()))8        print("{0}: {1}".format(result.start(), result.group()))
9        for j, i in enumerate(found.groups()):9        for j, i in enumerate((result.groups())):
10            if i:10            if (i):
11                print("{}/{}: {}".format(j + 1, found.start(j + 1), i))11                print("{0}/{1}: {2}".format(j+1, result.start(j+1), i))
12        named_groups = found.groupdict()12        gronamed = result.groupdict()
13        for i in named_groups:13        for i in (gronamed):
14            if named_groups[i]:14            if gronamed[i]:
15                print("{}/{}: {}".format(i, found.start(i), named_groups[i]))15                print("{0}/{1}: {2}".format(i, result.start(i), gronamed[i]))
16    else:16    else:
17        print("<NONE>")17        print("<NONE>")
t18    string = input()t18    word = input()
1919
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op