Shorthand for num
This commit is contained in:
4
main.go
4
main.go
@@ -57,6 +57,10 @@ func main() {
|
||||
// Generate the Lua script
|
||||
luaScript := buildLuaScript(luaExpr)
|
||||
|
||||
if strings.Contains(regexPattern, "!num") {
|
||||
regexPattern = strings.ReplaceAll(regexPattern, "!num", "(\\d*\\.?\\d+)")
|
||||
}
|
||||
|
||||
// Make sure the regex can match across multiple lines by adding (?s) flag
|
||||
if !strings.HasPrefix(regexPattern, "(?s)") {
|
||||
regexPattern = "(?s)" + regexPattern
|
||||
|
Reference in New Issue
Block a user