S
Sergio Ruiz
i am wondering if this is possible.. i can't seem to figure it out..
i am trying to see if a value is inside an array using regex..
something like:
a = ["pie","cookies","soda","icecream"]
i want to see if something starts with "coo" i should get one..
it doesn't look like i am doing it correctly..
irb(main):010:0> a.include?(/^coo/)
=> false
ideas?
thanks!
i am trying to see if a value is inside an array using regex..
something like:
a = ["pie","cookies","soda","icecream"]
i want to see if something starts with "coo" i should get one..
it doesn't look like i am doing it correctly..
irb(main):010:0> a.include?(/^coo/)
=> false
ideas?
thanks!