Groovy 1.6.4

groovy.text
Class RegexUtils

java.lang.Object
  groovy.text.RegexUtils

class RegexUtils
extends Object

Regex package required when using JDK 1.4 JDKs. Will be removed in the next major release of Groovy.

deprecated:
use Java's JDK 1.5+ equivalent classes instead


Constructor Summary
RegexUtils()

 
Method Summary
static String quote(String s)

Returns a literal pattern String for the specified String.

static String quoteReplacement(String str)

Replacement for Matcher.quoteReplacement from JDK 1.5

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Constructor Detail

RegexUtils

RegexUtils()


 
Method Detail

quote

public static String quote(String s)
Returns a literal pattern String for the specified String. Used to escape strings that may contain unintentional characters with special significance to replaceAll() etc. GROOVY-3287 : This is used instead of the default Retrotranslator backport implementation. See backport attribute in config/build-retro.xml.
param:
s the original string
return:
the escaped string
deprecated:
use java.util.regex.Pattern#quote(String) instead


quoteReplacement

public static String quoteReplacement(String str)
Replacement for Matcher.quoteReplacement from JDK 1.5


 

Copyright © 2003-2009 The Codehaus. All rights reserved.