C# Regular Expression Nested Paraenthisis Recursive

Need help to find the regular expression.

Text = @"{'the quick' | 'the lazy'}{{{'BEFORE'} 'fox' } | {{'BEFORE'} 'lion'}}"

Result String Array Should be –

[0] = 'the quick' | 'the lazy',
[1] = BEFORE/1 fox | BEFORE/2 lion

Unless two strings are split by |, I need them to side by side.

Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.