Orb Data – The Chapel Grenville Court, Britwell Road, Burnham, Bucks SL1 8DF, UK.
Tel: 01628 550450Â Â email: info@orb-data.com
Â
This article describes how to use the Odyssey Wizard display string feature to enhance Odyssey actions and show additional information in the wizard results screen.
In the screenshot below you will see an Odyssey Wizard that has been run. It has checked the status, endpoint version and the drive space on the Endpoints in the list. In the area highlighted by the red loop you can see that some of the actions have returned information into the Wizard cells. For example, the version cell shows 41128 and the disk space check show a number of Kb available.

The data show in the cells is determined by the Display String setting for each Wizard Action.
When editing an Odyssey Wizard action you can configure the Display String setting on the Advanced option step of the edit dialog.

There first field is a regular expression string,
![]()
The second field determines which lines in the output the regular expression is evaluated against,
![]()
We'll take a look at both of these fields in more detail.
Possible values for this field are
| Value | Notes |
|---|---|
| All Output | 1. Each line of output is matched against the regular expression individually; therefore multi-line regular expressions will not work. 2. The regular expression will evaluate against each line of output until it finds a successful match, then evaluation will stop. In other words, if more than one line in the output matches the expression only the first of these will be used for the display string. |
| Last Line | 1. This will only attempt to match the regular expression against the last line in the output, this does not include line that are empty or contain only space characters. |
Â
Odyssey will attempt to match the given regular expression against each line of output specified by the Extracted From field value.
The regular expression has to be found somewhere within the line but doesn't necessarily have to match the whole line exactly. For example,
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| G.* | Red, Green, Blue | Green, Blue | Green, Blue |
| .*Green.* | Red, Green, Blue | Red, Green, Blue | Red, Green, Blue |
If you want Display String to show only part of the Match Result then you will need to enclose the part to capture in round brackets. Note that if you have more than one section enclosed in round brackets only the last one will be used for the display string.
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| Red, (.*), Blue | Red, Green, Blue | Red, Green, Blue | Green |
| (.*), (.*), Blue | Red, Green, Blue | Red, Green, Blue | Green |
Basic Expressions
The allowable regular expressions follow the Java standards. We will explore some of the most common options here but for full details please refer to the documentation on the Sun website:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html#sum
Some of the common match expressions:
| Expression | Matches |
|---|---|
| . | Any character |
| X* | X, zero or more times |
| X+ | X, one or more times |
| X? | X, once or not at all |
| .* | Any character, zero or more times |
| \d | A digit [0-9] |
| \D | A non-digit |
| \s | A whitespace character |
| \S | A non-whitespace character |
| \w | A word character [a-zA-Z_0-9] |
| \W | A non-word character |
| \. | A dot/period character "." |
| \\ | The backslash character |
| \t | A tab character |
| ^ | Beginning of a line |
| $ | End of a line |
Â
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| \w+, \w+, (\w+) | Red, Green, Blue | Red, Green, Blue | Blue |
| \d+\.\d+\.\d+\.\d+ | IP Address is 10.168.112.11 | 10.168.112.11 | 10.168.112.11 |
Character Groups
To specify one of a particular group of characters use square brackets:
| Expression | Matches |
|---|---|
| [abc] | a, b or c |
| [^abc] | Any character except a, b or c |
| [a-z] | Any character between a and z |
Â
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| Drive [CDE]: (.*) | Drive D: 10Gb | Drive D: 10Gb | 10Gb |
Logical Group
To specify one of a list of values to look for you can use round brackets and the "|" operator. Note that Odyssey also uses round brackets to determine which part of an expression to use as a display string. It can be useful to switch this interpretation off by adding "?:".
| Expression | Matches |
|---|---|
| (X|Y) | Either X or Y |
| (?:X|Y) | Either X or Y, switching off Display String interpretation of these round brackets |
Â
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| (UK|FR|IT).* | FR012345 | FR012345 | FR |
| (UK|FR|IT)(.*) | FR012345 | FR012345 | 012345 |
| (?:UK|FR|IT).* | FR012345 | FR012345 | FR012345 |
Case Insensitivity
Case insensitive matching can be specified by starting the regular expression with (?i).
| Flag | Behaviour |
|---|---|
| (?i) | Case insensitive matching |
Â
| Display String Setting | Sample Line | Match Result | Display String Output |
|---|---|---|---|
| (?i)b\S* | Quick Brown Fox | Brown | Brown |
| (?i)b\S* | quick brown fox | brown | brown |
Â