Highlight.Patterns.BlockPattern.GetRegexPattern C# (CSharp) Method

GetRegexPattern() public method

public GetRegexPattern ( ) : string
return string
        public override string GetRegexPattern()
        {
            if (String.IsNullOrEmpty(EscapesWith)) {
                if (EndsWith.CompareTo(@"\n") == 0) {
                    return String.Format(@"{0}[^\n\r]*", Escape(BeginsWith));
                }

                return String.Format(@"{0}[\w\W\s\S]*?{1}", Escape(BeginsWith), Escape(EndsWith));
            }

            return String.Format("{0}(?>{1}.|[^{2}]|.)*?{3}", new object[] { Regex.Escape(BeginsWith), Regex.Escape(EscapesWith.Substring(0, 1)), Regex.Escape(EndsWith.Substring(0, 1)), Regex.Escape(EndsWith) });
        }