How do I make a python regex like "(.*)"
such that, given "a (b) c (d) e"
python matches "b"
instead of "b) c (d"
?
I know that I can use "[^)]"
instead of "."
, but I'm looking for a more general solution that keeps my regex a little cleaner. Is there any way to tell python "hey, match this as soon as possible"?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…