A Pattern
A pattern is used to tell the computer how to interpret a name in order to determine the time or
order. The pattern is supplied as a textual argument in the nearby textfield (some preset patterns are provided).
Patterns are simple regular expresions (descriptions of matching) with
a %n or a %N to indicate the part of the name being examined
that contains the information of interest (the time or order). The rest of the pattern
is comprised of typical pattern matching symbols, currently supported possibilities are;
- Any alpha numeric character - which implies that exact character must be matched.
- '.' - which implies match any character
- '+' - which implies match previous character one or more times
- '*' - which implies match previous character zero or more times
- '^' - which implies must match from start (symbol can only appear at start of pattern).
- '$' - which implies must match to end (symbol can only appear at end of pattern).
- '*' - which implies match previous character zero or more times
- '\\' - which implies treat the next character of the pattern as a character to match as opposed to a special character. That is, '\\.' means match a single '.'.
For example '.*c%n.+' will get 12 from 'abc12a' but nothing from 'abb12a' or 'abc12'.
A thing to note is that 'ab%N' will match with 'ab12', and 'cab12'. In order to restrict
matches to names that start with 'ab' the correct pattern would be '^ab%n'.
Also to match names that end in 'ab' that pattern should be similar to '%nab$'.
The pattern matching is case sensitive.