I am new to Python Regex and regex is not my strong suite. so
I have a text line e.g.
‘ the lazy brown fox “jump” over [txt_1234] ‘
next line
‘sky is falling’
the second line is therefore None.
its exactly as I write it.
- I need to extract the txt_1234 part only. no braces
- Also the result must begin with txt other ‘[]’ if present should be ignored
- If [txt_* is not present it should be None ofcourse
Looks like I would be using search instead of match.
sounds easy I know, i just can’t get it right.
Your regex will be…