I have to create a unique textual marker in my document using Python 2.7, with the following function:
def build_textual_marker(number, id):
return "[xxxcixxx[[_'" + str(number) + "'] [_'" + id + "']]xxxcixxx]"
the output looks like this : [xxxcixxx[[_'1'] [_'24']]xxxcixxx]
And then I have to catch any occurrence of this expression in my document. I ended up to the following regular expression but it seems not working fine:
marker_regex = "\[xxxcixxx\[(\[_*?\])\s(\[_*?\])\]xxxcixxx\]"
I was wondering how should I write the correct regex in this case?
.-\[xxxcixxx\[(\[_.*?\])\s(\[_.*?\])\]xxxcixxx\]