Victor Polukcht wrote:
> Great thanks.
>
> You post helped me so much!
>
> My resulting regexp is:
> "(?P<var1>^(.*)\s*)\(((?P<var2>\d+))\)\s+((?P<var3>\d+))"

Notice that this way you are including trailing whitespaces in the var1
group. You may want to put the "\s*" outside the parenthesis.

mmm... in this case you should make the ".*" in the first group
non-greedy. r"^(?P<var1>.*?)\s*\(((?P<var2>\d+))\)\s+((?P<var3>\d+))"
does the job.

Bye

Daniele

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to