xpointer.custom
Class Regexp

java.lang.Object
  |
  +--xpointer.custom.Regexp

public class Regexp
extends java.lang.Object


Constructor Summary
Regexp(Location location)
          Creates new Regexp
Regexp(org.w3c.dom.Node node)
          Creates new Regexp
 
Method Summary
 org.w3c.dom.ranges.Range[] getGroups(int index)
          Returns an array of ranges which contain the string-value selected by a sub-pattern of this regular expression enclosed by parenthesis.
 org.w3c.dom.ranges.Range[] getRegexp(java.lang.String pattern)
          Returns an array of ranges containing the string-value selected by the regular expression.
 void setFlag(int flag)
          Set a compilation flag for the regular expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Regexp

public Regexp(Location location)
Creates new Regexp
Parameters:
location - the location where the matching string is looked for

Regexp

public Regexp(org.w3c.dom.Node node)
Creates new Regexp
Parameters:
node - the node where the matching string is looked for
Method Detail

getRegexp

public org.w3c.dom.ranges.Range[] getRegexp(java.lang.String pattern)
Returns an array of ranges containing the string-value selected by the regular expression.

getGroups

public org.w3c.dom.ranges.Range[] getGroups(int index)
Returns an array of ranges which contain the string-value selected by a sub-pattern of this regular expression enclosed by parenthesis.
Parameters:
index - the index of the sub-pattern to be returned
Returns:
the array of ranges corresponding to a sub-pattern

setFlag

public void setFlag(int flag)
Set a compilation flag for the regular expression.
Parameters:
flag - the compilation flag