I\'m want use $ macro in groovy GString. When i\'m wrote this code
[\'cdata\',\'tdata\'].each { def sql = \"select * from $it_1\" }
i\'m ge
If the quotes are not from your IDE, or whatever you're evaluating your code in, you can do this:
['cdata','tdata'].each { def sql = "select * from ${it.replaceAll("'","")}_1" }