Better regexp
This commit is contained in:
parent
a9600516fb
commit
39d1f7b581
@ -25,7 +25,7 @@ def get_name_and_version():
|
|||||||
config = f.read()
|
config = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
exp = 'AC\_INIT\(\[\w+\]\,\[([0-9.]+)\]\,\[\w*\]\,\[(\w+)'
|
exp = 'AC_INIT\(\[[^\]]+\],\[([^\]]+)\],\[\],\[([^\]]+)\]'
|
||||||
match = re.search(exp, config)
|
match = re.search(exp, config)
|
||||||
if not match:
|
if not match:
|
||||||
print 'Cannot find the package name and version.'
|
print 'Cannot find the package name and version.'
|
||||||
|
Loading…
Reference in New Issue
Block a user