Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Ruben

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 " <ruben@heatmail.com> wrote in message <i50700$k59$1@fred.mathworks.com>...
> 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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.