Looking for a solution to parse a string with markers:
'This is {startMarker} the string {endMarker} for {startMarker} example. {endMarker}'
I want to transform it into an array that looks like this:
[
{marker: false, value: 'This is'},
{marker: true, value: 'the string'},
{marker: false, value: 'for'},
{marker: true, value: 'example.'}
]
Need some guidance on how I can achieve this while maintaining the sentence order and marker information. Any suggestions?