Rename pattern to regex

This commit is contained in:
2025-03-28 01:08:48 +01:00
parent 2629722f67
commit 2d523dfe64
6 changed files with 175 additions and 175 deletions

View File

@@ -23,14 +23,14 @@ type CaptureGroup struct {
// ProcessContent applies regex replacement with Lua processing
func ProcessRegex(content string, command utils.ModifyCommand) ([]utils.ReplaceCommand, error) {
var commands []utils.ReplaceCommand
logger.Trace("Processing regex: %q", command.Pattern)
logger.Trace("Processing regex: %q", command.Regex)
// Start timing the regex processing
startTime := time.Now()
// We don't HAVE to do this multiple times for a pattern
// But it's quick enough for us to not care
pattern := resolveRegexPlaceholders(command.Pattern)
pattern := resolveRegexPlaceholders(command.Regex)
logger.Debug("Compiling regex pattern: %s", pattern)
patternCompileStart := time.Now()

View File

@@ -33,7 +33,7 @@ func normalizeWhitespace(s string) string {
func ApiAdaptor(content string, regex string, lua string) (string, int, int, error) {
command := utils.ModifyCommand{
Pattern: regex,
Regex: regex,
Lua: lua,
LogLevel: "TRACE",
}