strip tag flags prior to searching
add function to dereference (multi-dimensional) arrays