// Regular expression for regex(?hiddenVar, "pattern", "i")
Expr regex = new E_Regex(new ExprVar(var2.getName()), pattern, "i") ;
ElementGroup elementGroup = new ElementGroup() ;
elementGroup.addElement(elementBGP) ;
elementGroup.addElement(new ElementFilter(regex)) ;
// Compile it.
// The better design is to build the Op structure programmatically,
Op op = Algebra.compile(elementGroup) ;
op = Algebra.optimize(op, execCxt.getContext()) ;
return QC.execute(op, input, execCxt) ;