TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


general:pattern_matching

This is an old revision of the document!


Pattern matching

TapeTrack has powerful pattern matching functionality that can be utilized globally in TapeTrack TapeMaster.

String Pattern Matching

To illustrate the effects of where and how the asterisk wildcard affects search results all examples will be performed against the following volume values.

100000L4, 100001L4, 100002L4, 100003L4, 100004L4, 100012L4, 100022L4, 200000L5, 200012L5, 200022L5

Asterisk (*)

The Asterisk is used as a wildcard to allow string matching in multiple positions and variable string lengths.

  • An Asterisk before a set of characters will show all items that end with those characters.
    Using the filter *L4 in the Volume-ID field will show all Volume-ID's ending in L4.

  • An Asterisk after a set of characters will show all items that begin with those characters.
    Using the filter 20* in the Volume-ID field will display all Volume-ID's starting with 20.

  • If used on its own, the Asterisk will match everything and will have no effect on volumes displayed.
  • Using two Asterisks, one on either side of a character or set of characters will show all items containing that character or set of characters at any character position.
    Using the filter *02* in the Volume-ID field will display all Volume-ID's that have 02 anywhere within the ID.

The Asterisk does not need to be used when entering a full Object-ID or when searching for Flags in the Volume List.

Question Mark (?)

The Question Mark is used to indicate that any character can exist in a specific character position.

Using the filter ??????L4 in the Volume-ID field will display all eight character Volume-ID's ending in L4.

Square Brackets ([ ])

Square Brackets can be used to provide parameters for a specific character position that are longer than one character. There are four different configurations:

Multiple Characters

When multiple characters are put in a Square Bracket, any of the characters listed will be displayed at the specified character position.

Using the filter, in the Volume-ID field, [12]?????L[45] will display all eight character Volume-ID's that start in either 1 or 2 and end in either L4 or L5.

Range Of Characters

Using the filter, in the Volume-ID field, [12]?????L[4-7] will display all eight character Volume-ID's that start in either 1 or 2 and end in either L4, L5, L6 or L7.

Vertical Bar (|)

When two or more characters are placed between Square Brackets and separated by Vertical Bars, the Vertical Bar will act as the word “OR” displaying any of the characters.

Using the filter, in the Volume-ID field, ??????L[4|5] will display all eight character Volume-ID's that end in either L4 OR L5.

Hyphen (-)

When two characters are placed between Square Brackets and separated by a Hyphen, any character alphanumerically between the two characters inclusive will display.

Using the filter, in the Volume-ID field, ??????L[1-4] will display all eight character Volume-ID's that end in L1, L2, L3 OR L4.

Exclamation Point (!)

When the Exclamation Point is placed immediately following the left Square Bracket in a set of Square Brackets, any character except for the characters listed after the Exclamation Point will display. This functionality also works with Multiple Characters, Vertical Bars, and Hyphens.

Using the filter, in the Volume-ID field, ??????L!([1-4]) will display all eight character Volume-ID's that start end in anything other than 1, 2, 3 or 4.

Date Pattern Matching

TapeTrack Date Format

TapeTrack allows you to represent dates both as literal date values and date calculations.

Syntax

  • YYYY-MM-DD: ISO Date format
  • *: Today
  • *[+-]x: Today + or - x days
  • M: The first day of this month
  • m: The last day of this month
  • Y: The first day of the year
  • y: The last day of the year
  • M+-x: The first day of the month + or - x months
  • M+-x+-y: The first day of the month + or - x months + or - y days
  • Y+-x: The first day of the year + or - x months
  • Y+-x+-y: The first day of the year + or - x years + or - y months
  • Y+-x+-y+-z: The first day of the year + or - x years + or - y months + or - z days

Examples

*-10 10 days ago
Y the beginning of this year
M-1 the last day of last month
y-1 the last day of last year
Y-1+3-1 the last day of February last year
general/pattern_matching.1579741768.txt.gz · Last modified: 2025/01/21 22:07 (external edit)