MarkdownSharp.Markdown.GetNestedBracketsPattern C# (CSharp) Méthode

GetNestedBracketsPattern() private static méthode

Reusable pattern to match balanced [brackets]. See Friedl's "Mastering Regular Expressions", 2nd Ed., pp. 328-331.
private static GetNestedBracketsPattern ( ) : string
Résultat string
        private static string GetNestedBracketsPattern()
        {
            // in other words [this] and [this[also]] and [this[also[too]]]
            // up to _nestDepth
            if (_nestedBracketsPattern == null)
                _nestedBracketsPattern =
                    RepeatString(@"
                    (?>              # Atomic matching
                       [^\[\]]+      # Anything other than brackets
                     |
                       \[
                           ", _nestDepth) + RepeatString(
                    @" \]
                    )*"
                    , _nestDepth);
            return _nestedBracketsPattern;
        }