23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

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 />

Exact Word Match — \<br />

Use \ to match a word starting with an n or N and ending with an h<br />

or H:<br />

regexpi(pstr, '\', 'match')<br />

ans =<br />

'Norah'<br />

Lookaround Operators<br />

Lookaround operators tell <strong>MATLAB</strong> to look either ahead or behind the<br />

current location in the string for a specified expression. If the expression is<br />

found, <strong>MATLAB</strong> attempts to match a given pattern.<br />

This table shows the four lookaround expressions: lookahead, negative<br />

lookahead, lookbehind, and negative lookbehind.<br />

Operator<br />

(?=expr)<br />

(?!expr)<br />

(?

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

Saved successfully!

Ooh no, something went wrong!