Test, validate and match regular expressions
This Python regex extracts a string located between specific control sequences, capturing it in a group named 'string'. It uses a positive lookbehind to ensure the target text is preceded by a literal '\x', a space, a modifier (-, +, ?, or comma), and another space. It also uses a positive lookahead to confirm the text is followed by '\x*'. It is specifically designed for parsing cross-references within SFM (Source Filmmaker) or similar custom markup formats.