Re: findobj -regexp documentation error?



Walter Roberson wrote:


The doc information
'Accessing Object Handles :: Handle Graphics Objects (Graphics)'
has the section,

Limiting the Search with Regular Expressions.
Increase the value of the MarkerSize property by 2 points on
all stemseries objects that do not have their property Tag set
to
'Steady State'.

h = findobj('-regexp','Tag','[^Steady State]');
set(h,{'MarkerSize'},num2cell(cell2mat(get(h,'MarkerSize'))+2))

Wouldn't this match tags whose letter are all not any of
'a', 'd', 'e', 't', 'y', or 'S' ?

That is, isn't the regexp '[^Steady State]' the syntax for
a negated character class, rather than the syntax for "anything
except the following string" ?

For example, if one sets the tag to 'taSty yeaSt', findobj with
the above expression will not find it.
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail,
2005/11/26)


You are right. However, in which version did you find this? I cannot
find it in R2006b or R2007a.

It is a very poor example, but I guess it will work in nine out of
ten cases.

/ per
.



Relevant Pages

  • findobj -regexp documentation error?
    ... Limiting the Search with Regular Expressions. ... Increase the value of the MarkerSize property by 2 points on ... all stemseries objects that do not have their property Tag set to ... rather than the syntax for "anything ...
    (comp.soft-sys.matlab)
  • Re: Question about Sun JAVAC
    ... > The RE and ERE syntax used by various Unix utilities clearly was ... > Of course the symbols available for ASCII I/O devices (that is, ... > But traditional mathematical syntax for regular expressions happened ...
    (comp.programming)
  • Re: How to renumber files?
    ... > portion of the file name by the magic sed command whose syntax I don't ... nice reference for Perl-compatible regular expressions. ... > suppose I can try to make the script do this automagically for me. ... You can run NUM through a sed command ...
    (comp.os.linux.misc)
  • Re: REgular expression to match a XML tag
    ... I am trying to match an XML tag using JS regular expressions. ... regular expressions are based on, to parse a context-free language, such as ...
    (comp.lang.javascript)
  • Re: Convert HTML to text
    ... all data from a webpage. ... could throw out the tag and everything between it or 2) It will be contained ... CSS, or even JS, regular expressions won't remove it. ... you say without downloading a page. ...
    (microsoft.public.vb.general.discussion)

Loading