什么属性返回调用re.compile时使用的正则表达式?

时间:2008-10-10 01:55:28

标签: python regex

def foo ():
   x = re.compile('^abc')

   foo2(x)

def foo2(x):

   # How do I get x to return '^abc'?
   logging.info('x is ' + x.???)

1 个答案:

答案 0 :(得分:4)