octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60157] save() expressive filtering when using


From: Rik
Subject: [Octave-bug-tracker] [bug #60157] save() expressive filtering when using brackets [ ] does not appear to work.
Date: Tue, 2 Mar 2021 16:48:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Update of bug #60157 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

For extra documentation, try searching for "character classes" in combination
with "regular expressions".  There is a lot out there.

To start with, create some variables


clear all
a1 = 1;
a2 = 2;
a3 = 3;
b1 = 21;
b2 = 22;
b3 = 23;
c1 = 31;
c2 = 32;
c3 = 33;


Here are some various documented combinations using the variables above.


# save all 'a' variables (a1, a2, a3)
save tmp a*
# save all variables of the form X1 where X can be any char (a1, b1, c1)
save tmp ?1
#save all variables X2 where X is any lowercase alphabetic char (a2, b2, c2)
save tmp [a-z]2
#save all variables X3 where X is not 'b' (a3, c3)
save tmp [^b]3
#same thing, but using '!' specifier (a3, c3)
save tmp [!b]3
#save a2,a3,c2,c3 using combination of LIST and LIST RANGES
save tmp [ac][2-3]


The modifiers like '!', '^' need to appear INSIDE the LIST.  The other
modifiers '?', '*' should appear OUTSIDE the LIST.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60157>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]