Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3952700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:53:10+00:00 2026-05-20T01:53:10+00:00

I have a groovy string like this: String test = abc{ der} token: \330\272%\006\272W\264\000T\226\022[\310\2207#fs\032q

  • 0

I have a groovy string like this:

String test = 

"""     
abc{ der}
token: "\330\272%\006\272W\264\000T\226\022[\310\2207#fs\032q"      
""";

However groovy is printing out like “غ%ºW”. How can I make it to print out exactly like the above string. I don’t want to escape the \.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:53:11+00:00Added an answer on May 20, 2026 at 1:53 am

    It sounds like what you want is the tripple slashy string, which doesn’t exist (yet?)

    You might try:

    String token = /\330\272%\006\272W\264\000T\226\022[\310\2207#fs\032q/
    String test = """
    abc{ der}
    token: "${token}"
    """
    

    Update! Now in Groovy 1.8, the slashy string is multiline. This should work:

    String test = /
    abc{ der}
    token: "\330\272%\006\272W\264\000T\226\022[\310\2207#fs\032q"
    /
    

    See: http://docs.codehaus.org/display/GROOVY/Groovy+1.8+release+notes#Groovy1.8releasenotes-Slashystrings

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a string in Groovy like so... 'user.company.name' ... and I want
I have the following code: InputStream reportFile = MyPage.this.getClass().getResourceAsStream(test.jrxml); HashMap<String, String> parameters = new
We are using grails-groovy with Hibernate, I have a SQL query like this in
I have a class like this : class User { String name; String password;
I have a java class, which I've added to my resources.groovy like this: import
I'm learning ruby (have a java/groovy background) and it looks like when writing methods,
I am trying to create a multi line string in Groovy. I have a
I have a String array in a Groovy class (args to a main method):
hi i have a flow in mule like this <flow name=MuleService> <vm:inbound-endpoint path=ms exchange-pattern=request-response
I'd like to be able to have something like this: <form> <input type=date name=params.date/>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.