Regular expressions
Regular expressions allow you to be more specific in the way you make activities available to projects. For example, UNICOM Intelligence Interviewer - Server Admin does not make certain UNICOM Intelligence Interviewer - Server Admin activities available until a project has been activated, or unless it has been set up for CATI. These requirements are all specified using regular expressions.
Regular expressions are a standard component of programming with the .NET Framework; for more information, see:
The notes that follow are a simplified version that will allow you to understand the expressions used in the installed .xml files for each activity.
The general syntax for including a regular expression in a MustMatch element is:
RegExp: <expression>
where <expression> is the regular expression.
As in any programming language, the purpose of a regular expression is to define in a general way the required structure and content of a string (or, more simply, of a list of characters). expression, therefore, consists of a list of letters, numbers or special characters.
In the installed activity .xml files, the regular expression you are most likely to see is:
RegExp:.+
The dot matches any single character and the plus sign means any number of occurrences of the previous item in the expression. Since the previous item is a dot, this expression matches any string of characters that is at least one character long. Here is a specification that checks whether a project has been activated. It does this by checking whether the TimeLastActivated property has a value that is at least one character long. If the property does not exists or has no value UNICOM Intelligence Interviewer - Server Admin assumes that it has never been activated.
<MustMatch>
<Project>
<Property name="TimeLastActivated" datatype="string">RegExp:.+</Property>
</Project>
</MustMatch>
See also