10.02.2013 Views

SlickEdit User Guide

SlickEdit User Guide

SlickEdit User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REGULAR EXPRESSIONS<br />

• Multiline mode - If Multiline mode is selected, rather than searching through the test cases lineby-line,<br />

regular expressions will be searched on all lines at once. This is useful for test cases that<br />

wrap to the next line. This works just as if you had entered \om on the <strong>SlickEdit</strong>® command line.<br />

• Case sensitive - If Case sensitive is selected, the regular expression search will be case<br />

sensitive. This option is on by default.<br />

• New expression button - To clear the tool window of all entries in order to start a new evaluation,<br />

click the button at the top of the tool window labeled New expression.<br />

• Open a saved expression button - To open an expression that you have already saved, click the<br />

folder button at the top of the tool window labeled Open a saved expression.<br />

• Save the current expression button - To save the current expression, click the diskette button at<br />

the top of the tool window labeled Save the current expression. Both the expression and the test<br />

cases will be saved to a file. The default extension is .regx.<br />

• Save as button - To save the current expression with a different file name than what has<br />

previously been saved, click the button at the top of the tool window labeled Save the current<br />

expression as.<br />

Regular Expression Syntax<br />

This section provides charts of regular expressions for each supported syntax (Brief, Perl, <strong>SlickEdit</strong>, UNIX,<br />

and Wildcards), including examples.<br />

NOTE There are some differences between our implementation of these syntaxes and those<br />

elsewhere.<br />

Brief Regular Expressions<br />

Brief regular expressions are defined in the following table.<br />

Brief Regular Expression Definition<br />

% Matches beginning of line.<br />

< Matches beginning of line.<br />

$ Matches end of line.<br />

> Matches end of line.<br />

? Matches any character except newline.<br />

* Minimal match of zero or more of any character except<br />

newline. This is the same as ?@.<br />

X+ Minimal match of one or more occurrences of X. See Minimal<br />

versus Maximal Matching for more information.<br />

X\:* Maximal match of zero or more of any character except<br />

newline. This is the same as ?\:@.<br />

X\:@ Maximal match of zero or more occurrences of X.<br />

X\:+ Maximal match of one or more occurrences of X.<br />

<strong>SlickEdit</strong>® <strong>User</strong> <strong>Guide</strong> 459

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!