Flexible matching logic framework
