14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

410 Formula Functions Reference Appendix B<br />

Character Pattern Functions<br />

Pat Fence<br />

Constructs a pattern that succeeds and matches the null string when the matcher moves forward through it,<br />

but fails when the matcher tries to back up through it. It is a one-way trap door that can be used to optimize<br />

some matches.<br />

Pat Arb No<br />

Constructs a pattern that matches zero or more copies of pattern.<br />

Pat Repeat<br />

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

Pat Conditional<br />

Saves the result of the pattern match, if it succeeds, to a variable named as the second argument (type) after<br />

the match is finished.<br />

Pat Immediate<br />

Saves the result of the pattern match to a variable named as the second argument (varName) immediately.<br />

Pat Altern<br />

Constructs a pattern that matches any one of the pattern arguments.<br />

Pat Concat<br />

Constructs a pattern that matches each pattern argument in turn.<br />

Pat Regex<br />

Constructs a pattern that matches the regular expression in the quoted string argument.<br />

Pat Match<br />

Pat Match executes a pattern match using the source in the first argument and the pattern in the second<br />

argument. The pattern must be constructed first, either inline or by assigning it to a JSL variable elsewhere.<br />

A third argument, if present, is the replacement text for the matched characters in the source argument (if<br />

the source argument is a variable). Pat Match returns true if the match succeeds. Additional arguments, in<br />

any order, are ANCHOR (match must begin at start of source), FULLSCAN (turn off some optimizations<br />

for special situations), and MATCHCASE (by default, A == a).<br />

Pat Match returns true or false rather than a string, so Pat Match is somewhat difficult to use in a formula.<br />

You might find the Regex function (“Regex” on page 407) easier to use when you are adding<br />

pattern-matching formulas in the Formula Editor.

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

Saved successfully!

Ooh no, something went wrong!