Originally posted as a Categorized Question.
In reply to How do I find the array element directly preceeding a 'match'? by Anonymous Monk