[dywang@deyu zzz]$ cat re-findall.py
#!/usr/bin/python3
import re, sys
str = sys.argv[1]
mo1 = re.match( r'^word', str, re.I)
mo2 = re.findall( r'abc$', str, re.I)
mo3 = re.match( r'w.*', str, re.I)
mo4 = re.match( r'[wd]', str, re.I)
mo5 = re.match( r'[^wd]', str, re.I)
if mo1: print('1. ^word :', mo1.group())
if mo2: print('2. abc$ :', mo2)
if mo3: print('3. w.* :', mo3.group())
if mo4: print('4. [wd] :', mo4.group())
if mo5: print('5. [^wd] :', mo5.group())
[dywang@deyu zzz]$ ./re-findall.py "word abc" 1. ^word : word 2. abc$ : ['abc'] 3. w.* : word abc 4. [wd] : w