Make the default value match for a variable non-greedy.
This avoids the problem where a closing brace in the description was seen as terminator.
This commit is contained in:
parent
2283975313
commit
60bb964163
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ if __name__ == "__main__":
|
|||
# x1 (f_unsigned = 0) The x coordinate of the startpoint.
|
||||
# x1 (f_unsigned) The x coordinate of the startpoint.
|
||||
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
|
||||
regex = re.compile(" *(" + variable + ") \((" + variable + ") *(?:(?:= *(.*))|)\) +(.*)\n")
|
||||
regex = re.compile(" *(" + variable + ") \((" + variable + ") *(?:(?:= *(.*?))|)\) +(.*)\n")
|
||||
res = regex.findall(data)
|
||||
|
||||
# empty table
|
||||
|
|
Loading…
Add table
Reference in a new issue