This is because 'Base Functionality' includes 'Functional' which is in the first list. You could reorder the if and elsif tests, but other problems of a similar kind are likely occur later. Instead you can anchor on word boundaries with \b, as in ...|\bFunctional\b|...
Phil
Comment on Re^2: Regular Expression Question - Having problems with anchors