File Exchange Pick of the Week

November 20th, 2009

Regular Expressions…a Cheat Sheet!

In my last Pick, I singled out someone who has contributed widely to image-processing discussions on the CSSM newsgroup. Today, I want to recognize a stalwart contributor to the MATLAB community, both through CSSM and through his numerous submissions to the MATLAB Central File Exchange. Anyone who has spent time posing or answering questions on CSSM knows of us. And though he has labeled all of his 41 submissions as "pedestrian," most are anything but.

Today's Pick comes to us from us. (Sounds circular, but power-user us apparently doesn't like capitals--or three-letter names!). In rex: a pedestrian regular expression operator synopsis generator, us has provided a very handy cheat sheet, of sorts, for creating Regular Expressions. For those of you who haven't yet delved the mysteries of regular expressions, they are powerful devices for searching or manipulating strings. But they can be cryptic to create or to decipher. Us's rex is a single-page reference for writing regular expressions. The commands can be written to the Command Window, or displayed in a listbox:

Many of us's files are Pickworthy. His functions are broadly useful, and his code is powerful, concise, and well-written. Give his files a browse--there's something there for everyone!

Comments?


Get the MATLAB code

Published with MATLAB® 7.8

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Doug: Ben, The name is in the name field as you saw in the video: files(1).name will give you just the name of the...
  • Ben: Hey, Thank you for the tutorial but I must ask, once you have the files required in the array, how do you parse...
  • jiro: Nisa, I’m not familiar with the Psychtoolbox. It’s not a toolbox developed by the MathWorks. As far...
  • nisa: Hi, I have just started to learn to use mathlab can this myaa codes be used with mathlab 7.5.0(R2007b)using...
  • Doug: @Rupa, Could you do this algorithm and then remove the two points and run again? Not efficient, but could be...
  • Doug: From the convhull doc http://www.mathworks .com/access/helpdesk /help/techdoc/ref/co nvhull.html xx = -1:.05:1;...
  • Mark: Very nice function, indeed, thanks for that. But why does’t MATLAB freeze the colormaps for subplots...
  • Steve L: MAuricio, From the description it sounds like the features variable is a cell array that itself contains a...
  • Fred: Doug, I have a set of coordinates for the perimeter of an object in random order. I want to plot these using...
  • Rupa: Hi, sorry to digress but I have a similar problem, I think. I would like to find the three (or n) smallest...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.