Is it possible to know if a section is in sectionlist
Posted: Wed Jan 29, 2014 7:54 pm
Is it possible to know if a section is in sectionlist?
For example soma{ print = sectionlist.in()}
What I managed to do is
sl = new SectionList()
soma {
sl.append()
n1 = sl.unique()
if n1==0{
sl.remove()}
}
Then id n1>0 I know that the section was in the sectionlist. Is this method good? Is there another way?
EDIT this is the other way...
And I have another question about issection("regular expression"). How can I do alternation?
from what I read http://unix.stackexchange.com/questions ... e-patterns
soma2{issection("soma{1-10}\|soma{20-25}")}
should return 1 but I receive 0
Thank You.
For example soma{ print = sectionlist.in()}
What I managed to do is
sl = new SectionList()
soma {
sl.append()
n1 = sl.unique()
if n1==0{
sl.remove()}
}
Then id n1>0 I know that the section was in the sectionlist. Is this method good? Is there another way?
EDIT this is the other way...
Code: Select all
ifsec sectionlist stmt
Executes stmt if the currently accessed section is in the sectionlist.from what I read http://unix.stackexchange.com/questions ... e-patterns
soma2{issection("soma{1-10}\|soma{20-25}")}
should return 1 but I receive 0
Thank You.