D
Daniel Webb
Hi everyone,
am trying to find a nice easy/simple way to
- search through an array of strings match the string I've input
- use that index to print out the word before in the array.
for example
[ahoy there,hello,me hearties,dear friends]
'hello' should output 'ahoy there'
http://pastie.org/711384
I'm hoping there's a way of doing this without regexp...
Thanks very much,
Dan
am trying to find a nice easy/simple way to
- search through an array of strings match the string I've input
- use that index to print out the word before in the array.
for example
[ahoy there,hello,me hearties,dear friends]
'hello' should output 'ahoy there'
http://pastie.org/711384
I'm hoping there's a way of doing this without regexp...
Thanks very much,
Dan