find if any memers of a set are in another set (blank line finder)?

new topic     » topic index » view thread      » older message » newer message

I want to be able to discern whether a sequence (a line of text) is "empty"
(ie, has *only* spaces or tabs or CR or any combination of those), or if it
has *any* alpha/num/punctuation content at all.  In other words,a "blank"
line finder.  And it needs to function as quickly as possible.

I thought there might be a spiffy way similar to how:

w = {1, 2, 3} = {1, 2, 4}  gives: w={1,1,0}

and then I could make a sequence of the numbers 33-126 (for all the
al/num/punc), and test any line against that sequence with an "or" in place
of the "="; but as a test,

w = {1, 2, 3} or {1, 2, 4} gives me:  w= {1,1,1}, which I don't understand.
(I'm thinking it means that neither 3 nor 4 are zero.)

So, is there some way to find if any member of a given set is found in
another set, or some different, good (fast) way to find "blank" lines?

Dan Moyer

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu