Thanks!  The ? got rid of the greediness! 

vince spicer wrote:
> 
> On Wed, Jul 29, 2009 at 11:35 AM, gpo <goodpotat...@yahoo.com> wrote:
> 
> 
> your grouping (.+) appears to be greedy, you can make it non-greedy with a
> question mark
> 
> EX:
> 
> pUserID=re.compile('UserID:\s+{(.+?)}',re.I)
> 
> Vince
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Issues-with-regex-escaping-on-%5C%7B-tp24724060p24726284.html
Sent from the Python - tutor mailing list archive at Nabble.com.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to