added option for straight string compare or regex