Wrap the condition into RegExp for consistency