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.

Perl Regular Expression Definition<br />

REGULAR EXPRESSIONS<br />

\z Specifies cursor position if match is found. If the expression<br />

abc\z is found, the cursor is placed after the c. Note that in<br />

UNIX, this is the same as \c. However in Perl, \c is used only<br />

for control characters.<br />

\n Matches newline character sequence. Useful for matching<br />

multi-line search strings. What this matches depends on<br />

whether the buffer is a DOS (ASCII 13,10 or just ASCII 10),<br />

UNIX (ASCII 10), Macintosh (ASCII 13), or user-defined ASCII<br />

file. Use \d10 if you want to match an ASCII 10 character.<br />

\r Matches carriage return (ASCII 13). What this matches<br />

depends on whether the buffer is a DOS (ASCII 13,10 or just<br />

ASCII 10), UNIX (ASCII 10), Macintosh (ASCII 13), or user<br />

defined ASCII file.<br />

\t Matches tab character.<br />

\b Matches at word boundary. For example, \bre matches all<br />

occurrences of “re” that only occur at the beginning of a word.<br />

\B Matches all except at word boundary. For example, \Bre<br />

matches all occurrences of “re” as long as it is not at the start<br />

of a new word.<br />

\Q and \E \Q matches all characters as literals until \E. This is useful for<br />

longer sequences of characters without the need for the<br />

escape character. \Q does not require termination with \E, as it<br />

will continue to match characters literally until the end of the<br />

search string. \E returns to using special character tokens for<br />

matching.<br />

\f Matches form feed character.<br />

\od Matches any 2-byte DBCS character. This escape is only valid<br />

in a match set ([...\od...]). [^\od] matches any single byte<br />

character excluding end-of-line characters. When used to<br />

search Unicode text, this escape does nothing.<br />

\om Turns on multi-line matching. This enhances the match<br />

character set, or match any character primitives to support<br />

matching end-of-line characters. For example, \om.+ matches<br />

the rest of the buffer.<br />

\ol Turns off multi-line matching (default). You can still use \n to<br />

create regular expressions which match one or more lines.<br />

However, expressions like .+ will not match multiple lines. This<br />

is much safer and usually faster than using the \om option.<br />

\oi Ignore case. Turns off case-sensitive matching in the pattern,<br />

overriding the global case setting. This modifier is localized<br />

inside the current grouping level, after which case matching is<br />

restored to the previous case match setting. Note that this is<br />

the equivalent to the Perl syntax ?i. See also \oc.<br />

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

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

Saved successfully!

Ooh no, something went wrong!