From: Megan on 31 Mar 2010 16:33 Jason Breslau <tendiamonds(a)mathworks.com> wrote in message <h7ohvv$rqr$1(a)fred.mathworks.com>... > Word boundaries in MATLAB regexp are \< and \> for start and end > boundaries respectively. > > >> [m,s]=regexp(' if (a > aa) goto gt; if (a < aa) goto lt; > ','\<a\>','match','split') > > m = > > 'a' 'a' > > > s = > > ' if (' ' > aa) goto gt; if (' ' < aa) goto lt; ' > > -=>J Thank you for posting this! I thought I might have to write an expression using look ahead and behind to simulate the \b word boundary effect. I had searched the help and didn't find anything about word boundaries. I'm glad I looked here before I started.
|
Pages: 1 Prev: MATLAB R14 on WIndows 7 X64 ??? Next: Using ginput from button in different fig? |