Need Help with MikroTik Script for Matching and Storing Patterns

http://forum.mikrotik.com/t/searching-for-words-in-an-array/171425/1