14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Appendix A JSL Syntax Reference 579<br />

Character Pattern Functions<br />

Argument<br />

string a string.<br />

Pat Rem()<br />

Description<br />

Constructs a pattern that matches the remainder of the string. It is equivalent to Pat R Tab(0).<br />

Returns<br />

A pattern.<br />

Argument<br />

none<br />

Pat Repeat(pattern, minimum, maximum, GREEDY|RELUCTANT)<br />

Description<br />

Matches pattern between minimum and maximum times.<br />

Returns<br />

A pattern.<br />

Arguments<br />

pattern a pattern to match against.<br />

minimum An integer that must be smaller than maximum.<br />

maximum An integer that must be greater than minimum.<br />

GREEDY|RELUCTANT If GREEDY is specified, it tries the maximum first and works back to the<br />

minimum. If RELUCTANT is specified, it tries the minimum first and works up to the maximum.<br />

Notes<br />

Pat Arbno(p) is the same as Pat Repeat(p, 0, infinity, RELUCTANT)<br />

Pat Repeat(p) is the same as Pat Repeat(p, 1, infinity, GREEDY)<br />

Pat Repeat(p, n) is the same as Pat Repeat(p, n, infinity, GREEDY)<br />

Pat Repeat(p, n, m) is the same as Pat Repeat(p, n, m, GREEDY)<br />

Pat Span("string")<br />

Description<br />

Constructs a pattern that matches one or more (not zero) occurrences of characters in its argument. It is<br />

greedy; it always matches the longest possible string. It fails rather than matching zero characters.<br />

Returns<br />

A pattern.<br />

Argument<br />

string a string.<br />

Pat String("string")<br />

Description<br />

Constructs a pattern that matches its string argument.

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

Saved successfully!

Ooh no, something went wrong!