Steve Osguthorpe
def currentMax= critBuilder.list{ projections{ sqlProjection "MAX(CAST (REGEXP_REPLACE(setCalibValue,'^([0-9]+).*\$','\\1','g') as INTEGER))", 'maxSetCalibValue', INTEGER } }