def statement = 'SELECT * from [nt:base] AS t where ISDESCENDANTNODE("/content/*") and contains(t.*, "cs-au-op")';
def query = session.getWorkspace().getQueryManager().createQuery(statement, 'JCR-SQL2');
def result = query.execute();
int count=0;
result.nodes.each { node ->
String nodePath = node.path;
def properties = node.getProperties();
properties.each { property ->
if (!property.isMultiple()) {
def propertyName = property.getName();
def propertyValue = property.getValue().getString();
if (propertyValue.contains('cs-au-op')) {
println nodePath+'/'+propertyName;
//println propertyValue;
def newPropertyValue = propertyValue.replaceAll("cs-au-op","cs-auop");
property.setValue(newPropertyValue);
session.save();
activate(node.path);
count++;
}
}
}
}