Matching a complex expression in python regex -
i have create unique textual marker in document using python 2.7, following function:
def build_textual_marker(number, id): return "[xxxcixxx[[_'" + str(number) + "'] [_'" + id + "']]xxxcixxx]"
the output looks : [xxxcixxx[[_'1'] [_'24']]xxxcixxx]
and have catch occurrence of expression in document. ended following regular expression seems not working fine:
marker_regex = "\[xxxcixxx\[(\[_*?\])\s(\[_*?\])\]xxxcixxx\]"
i wondering how should write correct regex in case?
Comments
Post a Comment