next up previous contents index
Next: Abbreviated notation for bases Up: Abbreviations for constructing collections Previous: Abbreviations for constructing collections

Wildcards

 

Two wildcard  symbols are available for use in the [B/D] commands listed below. The two wildcard characters are the question mark, ?, and the dollar symbol, $. They are used respectively to match any individual character and either any terminating sequence of characters or any beginning sequence of characters. The two wildcards operate independently, and can be used simultaneously.

$
is used at the beginning or end of any string to match any sequence of characters and no characters. For example, suppose that we consider only the four strings x.1.17, x.1.2, zy.1.2, and yy.3.2. Then x$ refers to the pair x.1.17 and x.1.2, and $2 to the pair x.1.2 and yy.3.2. The $ symbol on its own refers to all possible strings, and this is useful for global declarations. Note that both $x.1.2 and x.1.2$ match x.1.2.

?
is used to match any single character in a string. Thus ?y.?.2 refers to the pair zy.1.2 and yy.3.2.

Examples are as follows:

  1. The following instruction deletes all elements such as x11, x21, x11.7, etc., whose name consists of at least three characters beginning with x and with third character 1.

    BD>xelement :x?1$ tex2html_wrap_inline33712

  2. The following command deletes all elements.

    BD>xelement :$ tex2html_wrap_inline33712

  3. The following command deletes all elements whose names consist of four characters.

    BD>xelement : ???? tex2html_wrap_inline33712

The wildcard facilities are restricted to the commands listed at the beginning of the section, for elements and bases, and also to XASSIGN:  for deleting assignments, XSTRING:  for deleting strings, XC:  for deleting constants, and XF:  for deleting functions.



David Wooff
Wed Oct 21 15:14:31 BST 1998