23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

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.

Regular Expressions<br />

Ordinal Token Operators (Continued)<br />

Operator<br />

Usage<br />

$N Insert the match for the N th tokeninthereplacement<br />

string. Used only by the regexprep function. If N<br />

is equal to zero, then insert the entire match in the<br />

replacement string.<br />

(?(N)s1|s2)<br />

If N th token is found, then match s1, elsematchs2<br />

Named Token Operators<br />

Operator<br />

(?expr)<br />

\k<br />

Usage<br />

Capture in a token all characters matched by the<br />

expression within the parentheses. Assign a name to<br />

the token.<br />

Match the token referred to by name.<br />

3-77

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

Saved successfully!

Ooh no, something went wrong!