Specmatch is a system for determining whether a name (or any other value) matches a given specification ("spec"), and is used in various EDS modules for functionality such as filtering.
A specification is comprised of one or more patterns, separated by semicolons ;, AND or &, OR or | keywords.
If OR or | is used as a separator, then a value matches the specification if the value matches any one of the patterns.
If AND or & is used as a separator, then a value matches the specification only if it matches all of the patterns.
If a semicolon is used as a separator, the logic that is used between patterns is determined by the type of comparison in each pattern (see the comparisons table below).
AND and OR can be combined in a specification, but note that brackets are not supported for controlling order of operations - AND logic will be processed before OR logic.
A pattern consists of a value and an optional comparison prefix, e.g. =E1 meaning "equal to E1".
The value in a pattern can generally consist of text, digits and delimiters. If delimiters in the pattern would be confused as a comparison prefix or the keywords AND, &, OR or |, then the value in the pattern should be enclosed in quotation marks, e.g. ="&A3" meaning equal to &A3.
The only way to compare to nothing or an empty value is to use quotation marks with nothing between them, e.g. ="" meaning must be blank, emtpy, no value.
All comparisons are case-insensitive, so E1 will match to E1 or e1.
A pattern can contain one or more wildcard characters, which will match different types of characters:
|*||Multiple characters (letters, digits and delimiters)|
|?||Any single character (letter, digit or delimiter)|
Note: For convenience, some uses of Specmatch in EDS automatically append a * to the end of the pattern (if there is only one pattern present, and the pattern contains no comparisons or wildcards). This has the effect of the specification matching values that start with the pattern text (typically used for filtering of lists). For example, a spec of Cable1 will match Cable1 and Cable12.
If this occurs and is not desirable behaviour, you can force an exact match by quoting the text in the spec. Modifying the previous example to "Cable1", causes it to only match Cable1 and not Cable12.
A pattern can begin with a comparison prefix from the following table. If no prefix is specified, "Equal to" is assumed.
|Prefix||Comparison||Wildcards accepted?||Semicolon logic|
|!=||Not equal to||Yes||AND|
|<=||Less than or equal to|
|>=||Greater than or equal to|
|>=LT101 ; <=LT200||LT101|
|<PT10 OR >=PT20||PT5|
|!="GA-*.dwg" AND !="WD-*.dwg"||0010031.dwg|