You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />
Simulation Macro Functions, Character and Sequence Functions<br />
The following rules and special characters allow for constructing RE‟s from single character<br />
RE‟s.<br />
Character Description<br />
* Asterisk. A single character RE, followed by an asterisk matches zero or<br />
more occurrences of the single character RE.<br />
\{m\}<br />
\{m,\}<br />
\{m,n\}<br />
A single character RE followed by one of these brace operators is an RE<br />
that matches a range of occurrences of the single character RE. The<br />
values of m and n must be integers in the range 0-255. \{m\} matches<br />
exactly m occurrences; \{m,\} matches at least m occurrences; \{m,n\}<br />
matches the largest number of occurrences between m and n.<br />
\(…\) An RE enclosed between the character sequence \( and \) matches whatever<br />
the unadorned RE matches, but saves the matched string in a numbered<br />
buffer. Up to 9 buffers are permitted, assigned sequentially.<br />
\n Match the contents of the n th substring buffer.<br />
The substitution string s3 in the $FEDIT function can reference matched text saved in numbered<br />
buffers using the \( and \) sequence. For example,<br />
$P3=$FEDIT($P3,'G44\(..*\)','\1G44')<br />
This searches for G44 followed by one or more characters (saved in buffer number one). The<br />
substitution string replaces the matched text by the contents of the saved buffer number 1 and the<br />
string G44. This has the effect of reversing the order of appearance of G44 in the string.<br />
The $FELEM Function<br />
result=$FELEM(q,n)<br />
Returns: Any<br />
This function provides an obsolete method of returning the value of element n in sequence q. It is<br />
used to extract the individual elements of sequence variables. The macro ( ) grouping operator<br />
should be used instead of $FELEM. For example, specify q(n) instead of $FELEM(q,n).<br />
The $FFIND Function<br />
result=$FFIND(a1,a2[,n])<br />
Returns: String<br />
This function finds the first occurrence of the value a2 in the array or sequence a1. The array<br />
must be specified with an index. If no match was found a value of zero is returned. Note that for<br />
arrays, the return value specifies the position found with respect to the array index. The maximum<br />
number of entries to search can be specified with n. If not specified, the search terminates<br />
at the end of the array or sequence.<br />
<strong>ICAM</strong> Technologies Corporation – Proprietary 171