python 正则匹配问题。

python 正则匹配问题。

........
num = re_expression.search(strings)
if num.group(1) == None:
  num.group(1) = 1
........
问题:

正则表达式匹配的是一个数字
如果没匹配到就给它赋值 1,我想问下,正则search如果没找到的话,返回来是None吗???
或者是Null?????还或者是0????

请高手指教。
谢谢。
search(          pattern, string[, flags])
    Scan through string looking for a location where the regular expression pattern produces a match, and return a corresponding MatchObject instance. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string.


QUOTE:
原帖由 luffy.deng 于 2008-9-28 11:50 发表
search(          pattern, string[, flags])
    Scan through string looking for a location where the regular expression pattern produces a match, and return a corresponding MatchObject instance.  ...

None


Thanks
自己试试不就知道了?干嘛来这里问阿?
None