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
Post a Comment