Page 1 of 1

Search array by a regex

Posted: Fri Jan 15, 2010 8:54 am
by klevis miho
How can I search an array for a regular expression, and get the array keys for the match?

Re: Search array by a regex

Posted: Fri Jan 15, 2010 11:32 am
by pickle
I think you'd have to iterate through the array, doing a regex compare on each value.

Re: Search array by a regex

Posted: Fri Jan 15, 2010 11:48 am
by klevis miho
yeah, thats what i did :) , thnx