mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Last one, really
This commit is contained in:
@@ -180,8 +180,11 @@ namespace SabreTools.Core.Filter
|
|||||||
|
|
||||||
// Split the string into parseable pieces
|
// Split the string into parseable pieces
|
||||||
// - Left and right parenthesis are separate
|
// - Left and right parenthesis are separate
|
||||||
// - All non-whitespace characters match
|
// - Operators & and | are separate
|
||||||
return Regex.Split(input, @"(\(|\)|[^\s()]+)");
|
// - Key-value pairs are enforced for statements
|
||||||
|
// - Numbers can be a value without quotes
|
||||||
|
// - All other values require quotes
|
||||||
|
return Regex.Split(input, @"(\(|\)|[&|]{1,2}|[^\s()""]+[:!=]\d+|[^\s()""]+[:!=]{1,2}""[^""]*"")");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user