The
-> (Ctrl-F) command allows you to establish a search pattern for the data that has already been formatted by the bufdump program. The command also does an initial search for this pattern.The search pattern can search either for exact matches to text strings in the formatted buffer, to matches for regular expressions or for bit patterns or sequences of bit patterns.
The menu command brings up the search dialog shown below.
The numbers in the list below refer to the numbers on the figure above:
You may enter strings for text searches in this text entry box. Note that text entry is only enabled when a text search is selected (see 6 below).
The radio buttons to the right allow you to select between an exact textual search or a search for a regular expression. An example of a regular expression string is [Ee]vent which matches either "Event" or "event". The full syntax definition of regular expressions is powerful and complex. A discussion of this syntax is beyond the scope of this document. Refer either to the unix regex(7) man page or the documentation of the Tcl regexp command in any Tcl book for more information about regular expressions.
This section of the dialog allows you to visually edit a bit patttern. This section of the dialog is only enabled if the Bit Pattern Search radio button is selected. Each x below represents a bit. Using the up arrow buttons above and the down arrow buttons below each bit you can toggle each bit between the states:
Means a match requires a 1 in this bit position
Means a match requires a 0 in this bit position
Means that any bit value will match in this position.
You may alter the order of bit patterns by selecting a pattern and clicking the up or down arrow buttons here to move it up or down within the list. If you wish to remove a pattern from the list select it and click the
button.Bit pattern matches can be either a Match any criterion where a buffer is accepted if the content of the buffer has a bit pattern that matches any of the bit patterns in the right listbox, or Match Sequence where a match is only declared if a sequence of words matches all of the bit patterns in the ordered sequence of bit patterns in the right listbox. Use these radio buttons to select which type of match you want.
These radio buttons allow you to select the search type. Selecting one of them enables the appropriate part of the dialog, and disables the inappropriate part.
The buttons in this frame operate as follows:
Accepts the search pattern, and performs a search from the beginning of the formatted data for the first match on the new search pattern.
Dismisses the dialog and neither changes the search pattern nor performs a search.
When a search pattern matches, it is brought into the displayed part of the formatted data and the section that matches is highlighted. This highlighting is not exact, however the first element highlighted corresponds to the start of the match. The picture below shows a match on the bit pattern sequence:
0101 1000 xxxx xxxx, 0000 0000 0000 0001: