modify regex.py to add argument support and raw string conversion.