[ https://issues.apache.org/jira/browse/GROOVY-7625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107054#comment-15107054 ]
ASF GitHub Bot commented on GROOVY-7625: ---------------------------------------- GitHub user anshbansal opened a pull request: https://github.com/apache/groovy/pull/243 Fix for GROOVY-7625 See JIRA https://issues.apache.org/jira/browse/GROOVY-7625 You can merge this pull request into a Git repository by running: $ git pull https://github.com/anshbansal/incubator-groovy patch-12 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/243.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #243 ---- commit cc3cea5655a6460048a5a8d75fe8b2a2988fc1fd Author: Aseem Bansal <anshban...@users.noreply.github.com> Date: 2016-01-19T17:39:56Z Fix for GROOVY-7625 ---- > Slashy string in groovy allows brackets but double quoted string does not. > Why? > ------------------------------------------------------------------------------- > > Key: GROOVY-7625 > URL: https://issues.apache.org/jira/browse/GROOVY-7625 > Project: Groovy > Issue Type: Documentation > Reporter: Aseem Bansal > Priority: Minor > > This > println("$()") > gives me a compiler error "Either escape a dollar sign or bracket the value > expression" > But this > println(/$()/) > prints `$()` fine. No errors > Why is there a difference? The only documented difference is that slashy > strings make working with backslashes easier. I understand that a variable > name cannot start with a bracket so it should be possible to make that > special case. Is that the case for the slashy strings? > Just came across this when doing something with regex. -- This message was sent by Atlassian JIRA (v6.3.4#6332)