Update regexp in class search to work with multiple classes

1. change ^class$ -> \bclass\b so that we can match multiple classes
2. update multiple class search to work with unicode or str classes
3. add tests for these changes