<commit_before>package cucumberexpressions

import (
	"fmt"
	"regexp"
	"strings"
)

var ESCAPE_REGEXP = regexp.MustCompile(`([\\^[$.|?*+])`)
var PARAMETER_REGEXP = regexp.MustCompile(`(\\\\\\\\)?{([^}]+)}`)
var OPTIONAL_REGEXP = regexp.MustCompile(`(\\\\\\\\)?\([^)]+\)`)
var ALTERNATIVE_NON_WHITESPACE_TEXT_REGEXP = regexp.MustCompile(`([^\s^/]+)((\/[^\s^/]+)+)`)
var DOUBLE_ESCAPE = `\\\\`

type CucumberExpression struct {
	source         string
	parameterTypes []*ParameterType
	treeRegexp     *TreeRegexp
}

func NewCucumberExpression(expression string, parameterTypeRegistry *ParameterTypeRegistry) (*CucumberExpression, error) {
	result := &CucumberExpression{source: expression}

	expression = result.processEscapes(expression)

	expression, err := result.processOptional(expression)
	if err != nil {
		return nil, err
	}

	expression, err = result.processAlteration(expression)
	if err != nil {
		return nil, err
	}<commit_msg>cucumber-expressions: Remove unnecessary escape<commit_after>package cucumberexpressions

import (
	"fmt"
	"regexp"
	"strings"
)

var ESCAPE_REGEXP = regexp.MustCompile(`([\\^[$.|?*+])`)
var PARAMETER_REGEXP = regexp.MustCompile(`(\\\\\\\\)?{([^}]+)}`)
var OPTIONAL_REGEXP = regexp.MustCompile(`(\\\\\\\\)?\([^)]+\)`)
var ALTERNATIVE_NON_WHITESPACE_TEXT_REGEXP = regexp.MustCompile(`([^\s^/]+)((/[^\s^/]+)+)`)
var DOUBLE_ESCAPE = `\\\\`

type CucumberExpression struct {
	source         string
	parameterTypes []*ParameterType
	treeRegexp     *TreeRegexp
}

func NewCucumberExpression(expression string, parameterTypeRegistry *ParameterTypeRegistry) (*CucumberExpression, error) {
	result := &CucumberExpression{source: expression}

	expression = result.processEscapes(expression)

	expression, err := result.processOptional(expression)
	if err != nil {
		return nil, err
	}

	expression, err = result.processAlteration(expression)
	if err != nil {
		return nil, err
	}
{'fraction_non_alphanumeric': 0.17375328083989502, 'fraction_numerical': 0.0, 'mean_word_length': 5.108974358974359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6193581', 'n_tokens_mistral': 683, 'n_tokens_neox': 634, 'n_words': 121}