Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

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

Robert Fletcher

2008-08-21

Replies: Find Java Web Hosting

Author LoginPost Reply
Yes, you can escape them. They're just another string delimiter, they
don't mean anything special in relation to regular expressions. If
you're using regex matching on paths like that I'd consider using
single or double quote delimiters as the regex string will be much
more readable.

On Thu, Aug 21, 2008 at 12: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/?
>

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

  http://xircles.codehaus.org/manage_email


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