The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Match regular expression
Replies: 4   Last Post: Aug 24, 2010 6:47 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 16
Registered: 6/17/10
Re: Match regular expression
Posted: Aug 24, 2010 6:47 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Finally, this is all I needed

match = '(&&)|(\|\|)';
[conn split] = regexp(expr, match, 'match', 'split');

Thank you James :-)

"Ruben " <> wrote in message <i50700$k59$>...
> By the way, I would like also to be able to determine in which order appeared the expressions to match ('&&', '||'). I would like to generate a cell array containing {'&&', '||', '&&', '&&', '||' } (for a expression like: a==0 && b==1 || c>3 && c>5 && d==1 || f < 3)
> Hope someone can help :-)

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.