Class Escape

java.lang.Object
org.basex.query.util.regex.RegExp
org.basex.query.util.regex.Escape

public final class Escape extends RegExp
Escape sequence.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Method Details

    • get

      public static RegExp get(String esc)
      Creates a regular expression from the given escape sequence.
      Parameters:
      esc - escape sequence
      Returns:
      regular expression
    • getCp

      public static char getCp(String single)
      Gets the character escaped by the given single escape.
      Parameters:
      single - single-char escape sequence
      Returns:
      the escaped char
    • inGroup

      public static RegExp[] inGroup(String esc)
      Translates the given escape into character ranges if possible.
      Parameters:
      esc - escape sequence
      Returns:
      array of regular expressions suitable for char groups