How to delete multiple items on a list containing a specific character

Hey guys, I'm new to Snap! so I'd appreciate the help!

I have an alphanumeric list containing "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "b1", "b2", and etc.

I want to be able to delete any item containing the number 4 and greater. So the output I want is "a1", "a2", "a3". Is there any way to do this?

Hope this helps

You want b1, b2, and b3 also, right?

(This isn't your homework, is it? It'd be a nice homework problem.)

Actually, this is better:

Yeah. I didn't want to assume exactly one letter at the beginning, but if that's the case, I agree your way is simpler.

Thanks everybody!

Which library did you get the "join input list" block?

It's the regular JOIN block. Hold the input expression over the left and right arrowheads at the end of the block and you'll see a red halo covering all the input slots. Let go when you see the red halo and it becomes an INPUT LIST.

ok got it, thanks!!

I find it easier to remove all the inputs oin the join block, then drop the reporter on it.

That does make it easier. Also keep the JOIN separate from other blocks so you don't accidentally drop the block into the wrong one.

If you get rid of all the inputs, then it won't try to drop into the last one.

No... the block you're dropping into JOIN might end up in a block the JOIN is in.

I only do it if I can't get it into the input list.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.