diff --git a/CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs b/CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs index 78e8555..ee3b19b 100644 --- a/CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs +++ b/CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs @@ -16,7 +16,7 @@ public class ExpressionEvaluator { #region Regex declarations - private static readonly Regex varOrFunctionRegEx = new Regex(@"^((?[+-])|(?(?[?])?\.)?)(?[a-zA-Z_][a-zA-Z0-9_]*)\s*((?(?[+\-*/%&|^]|<<|>>)?=(?![=>]))|(?([+][+]|--)(?![a-zA-Z0-9_]))|((?[<](?>[^<>]+|(?[<])|(?<-gentag>[>]))*(?(gentag)(?!))[>])?(?[(])?))", RegexOptions.IgnoreCase | RegexOptions.Compiled); + private static readonly Regex varOrFunctionRegEx = new Regex(@"^((?[+-])|(?(?[?])?\.)?)(?[a-zA-ZáàâãéèêíïóôõöúçñÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ_][a-zA-ZáàâãéèêíïóôõöúçñÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ0-9_]*)\s*((?(?[+\-*/%&|^]|<<|>>)?=(?![=>]))|(?([+][+]|--)(?![a-zA-Z0-9_]))|((?[<](?>[^<>]+|(?[<])|(?<-gentag>[>]))*(?(gentag)(?!))[>])?(?[(])?))", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex numberRegex = new Regex(@"^(?[+-])?\d+(?\.?\d+(e[+-]?\d+)?)?(?ul|[fdulm])?", RegexOptions.IgnoreCase); private static readonly Regex stringBeginningRegex = new Regex("^(?[$])?(?[@])?[\"]"); private static readonly Regex internalCharRegex = new Regex(@"^['](\\[']|[^'])*[']");