@Override
public SDBConstraint recognize(Expr expr)
{
MapResult rMap = null ;
if ( ( rMap = regex1.match(expr) ) != null )
{
Var var = rMap.get("a1").getExprVar().asVar() ;
String pattern = rMap.get("a2").getConstant().getString() ;
return new RegexSqlGen(expr, regex1, pattern, null, true) ;
}
if ( ( rMap = regex1_i.match(expr) ) != null )
{
Var var = rMap.get(Var.alloc("a1")).getExprVar().asVar() ;
String pattern = rMap.get(Var.alloc("a2")).getConstant().getString() ;
return new RegexSqlGen(expr, regex1_i, pattern, "i", true) ;
}
return null ;
}