regex - Is there some way of escaping characters in Groovy regexes? -


Is there a way to avoid characters in the Graveyi Reggae? It would be nice to write a single backslash instead of 4

You do not need four of them. Two must be enough to match anything with a backslash in it.

  def file = /C:\geo\file.txt/ assert file = ~ /.*\\.*/  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -