Python: script for regexp.