Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

Re: [groovy-user] Q: slashes in slash strings

Alex Greif

2008-08-21

Replies: Find Java Web Hosting

Author LoginPost Reply
I think you cannot use slashy strings in this case. Try it with
pattern Strings like this:
groovy:000> p = ~"/home/me/"
===> /home/me/
groovy:000> p.class
===> class java.util.regex.Pattern

Alex.

On Thu, Aug 21, 2008 at 1:40 PM, grkuntzmd <grk@(protected):
> If I want to include slashes ('/') in slash-quoted strings, do I need to
> escape them with backslashes? In other words, if I need to create a Regex
> that matches a *nix-like path, should I use /x\/y/ or /x/y/?
>
> Thanks.
>
> G. Ralph Kuntz, MD
> Chief Software Architect
> meridianEMR, Inc.
> ________________________________
> View this message in context: Q: slashes in slash strings
> Sent from the groovy - user mailing list archive at Nabble.com.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.