Search array by a regex
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Search array by a regex
How can I search an array for a regular expression, and get the array keys for the match?
Re: Search array by a regex
I think you'd have to iterate through the array, doing a regex compare on each value.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Search array by a regex
yeah, thats what i did
, thnx