Skip to content

Commit

Permalink
Allow operator-like character in value name
Browse files Browse the repository at this point in the history
Means that the operator needs a space before it in most cases

Already was the case with - and * but now also the case for other
operator-like characters + / ^ !
  • Loading branch information
blowfishpro committed Feb 11, 2018
1 parent 94e57a9 commit 7f23ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ModuleManager/MMPatchLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ private static void PurgeUnused()
#region Applying Patches

// Name is group 1, index is group 2, vector related filed is group 3, vector separator is group 4, operator is group 5
private static Regex parseValue = new Regex(@"([\w\&\-\.\?\*]+(?:,[^*\d][\w\&\-\.\?\*]*)*)(?:,(-?[0-9\*]+))?(?:\[((?:[0-9\*]+)+)(?:,(.))?\])?(?:\s*([+\-*/^!]))?");
private static Regex parseValue = new Regex(@"([\w\&\-\.\?\*+/^!]+(?:,[^*\d][\w\&\-\.\?\*]*)*)(?:,(-?[0-9\*]+))?(?:\[((?:[0-9\*]+)+)(?:,(.))?\])?(?:\s*([+\-*/^!]))?");

// Path is group 1, operator is group 5
private static Regex parseAssign = new Regex(@"(.*)(?:\s)+([+\-*/^!])?");
Expand Down

0 comments on commit 7f23ad8

Please sign in to comment.