add regex for complex conditions