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

end<br />

end<br />

Parks in Tanzania:<br />

Arusha<br />

Mikumi<br />

Kilimanjaro<br />

Udzungwa<br />

Negative Lookahead — expr(?!test)<br />

Generate a series of sequential numbers:<br />

n = num2str(5:15)<br />

n =<br />

5 6 7 8 9 10 11 12 13 14 15<br />

Use both the negative lookbehind and negative lookahead operators together<br />

to precede only the single-digit numbers with zero:<br />

regexprep(n, '(?

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

Saved successfully!

Ooh no, something went wrong!