将param替换成paramValue
def queryContent = "select * from query where id=${param}"
def regex = '\\$\\{param\\}'
def matcher = (queryContent =~ /${regex}/)
queryContent = matcher.replaceAll('paramValue')
参考: http://docs.codehaus.org/display/GROOVY/Tutorial+5+-+Capturing+regex+groups