我有一个正则表达式,它适用于regex101。
但在我的python代码中,它没有返回任何值。
如果你们能帮我,那就太好了。
链接到我的正则表达式
https://regex101.com/r/T0Jvq4/1
这是我的职责。
legalDescription = tryRegexData(r"(?<=Legal Description:)(\n)(.*)^(?:(?!Property Use:).)*",propertyArea,0)
def tryRegexData(regex,area,num):
try:
return re.search(regex,area.text).group(num).strip()
except Exception as e:
return ""
非常感谢。