import re
m=re.search('(.*?)\s(.*)','RegExr was created by gskinner.com, and is proudly hosted by Media Temple.')
print(m.group())
print(m.group(1))
print(m.group(2))
log='127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326'
import re
m=re.search("(.*?)\s(.*?)\s(.*?)\s\[([0-9]*\/[A-Z][a-z]*\/[0-9]*).*",log)
print(m.group(1))
print(m.group(2))
print(m.group())
數字: [0-9]
英文: [A-Z][a-z]
next row: \n
white space: \s
any character: .
multiplier: *
end group notifier: ? e.g. (.*?)
escaped character: \ --> catches \ , [ --> catches [