Search for keywords inside a list of symbols
Weird title... sorry.
Like you would inside the finder or explorer, I'd like to be able to search for keywords inside a coll (or any stored list).
Here is my example :
List is stored in a coll :
amazing_rock_guitar_loop.wav
cool_guitar2_loop.wav
piano_loop.wav
piano2_loop.wav
If, for example, I send the message "guitar", the output would be this list :
amazing_rock_guitar_loop.wav cool_guitar2_loop.wav
Any idea on how to achieve this?
Thank you
You could dump the contents out and then run it through a [regexp]. One way:
Omg this is exactly what i needed! It's been hours that I tried doing something with regexp and could find this simple way of using regexp ahaha! Thanks so muuuch!
Small other question. Is it possible to kind of $1 the regexp? regexp .*$1.* and we send it a message?
Probably the best way to do this is to use the 're' message:
Wow!! Im mindblown :D Thank you very much!!
Ben Bracken - that is genius. Nice one. Thanks for posting this.