I need to extract tokens that are marked with curly brackets from a given string.
I have tried using Expresso to construct something that will parse…
------------------------------------------------------------- '{Token1}asdasasd{Token2}asd asdacscadase dfb db {Token3}' -------------------------------------------------------------
and produce ‘Token1’, ‘Token2’, ‘Token3’
I tried using..
------------------------------------------------------------- ({.+}) -------------------------------------------------------------
…but that seemed to match the entire expression.
Any thoughts?
Try
The \{ will escape the '{' (which has meaning in a RegEx). The \} likewise escapes the closing } backet. The .*? will take minimal data, instead of just .* which is 'greedy' and takes everything it can.