def param = 'string' def str = / multiline $param no need to escape slash \n / assert str instanceof GString assert str.readLines().size() == 4 assert str.contains('\\n') assert str.contains('string')