     // MARK: Private Methods
     
     private func patterns(for mode: RegularExpressionParseMode) -> [String] {
+
+        // regex pattern to avoid matching escaped character
+        let escapeIgnorer = "(?<!\\\\)(?:\\\\\\\\)*"
         
         switch mode {
         case .search:

//  limitations under the License.
//

import Foundation

/// regex pattern to avoid matching escaped character
private let escapeIgnorer = "(?<!\\\\)(?:\\\\\\\\)*"


enum RegularExpressionParseMode {
    




private extension StringProtocol {
    
    /// ranges of inside of the most outer pairs of brace
    func ranges(bracePair: BracePair) -> [Range<Index>] {
        
        var index = self.startIndex
