Full threadmlgh·Sorry, but the implementation posted is O(|pattern| * |name|), not linear. http://ideone.com/2xCXyYView on HN