re 正则表达式
>>> import re
>>> url = 'http://192.168.1.4/iomc3/ws.php?do=devices&token=a1b2c3d4e5f6'
>>> n = re.match('(.*)(do=)(.*)(\&token)(.*)', url)
>>> n.groups()
('http://192.168.1.4/iomc3/ws.php?', 'do=', 'devices', '&token', '=a1b2c3d4e5f6')
>>>