/** */ public final boolean isCaptured(String groupName) { Integer id = re.groupId(groupName); if (id == null) throw new IllegalArgumentException("unknown group: \"" + groupName + "\""); return isCaptured(id); }
/** */ public final boolean isCaptured(String groupName) { Integer id = re.groupId(groupName); if (id == null) throw new IllegalArgumentException("unknown group: \"" + groupName + "\""); return isCaptured(id); }
public boolean getGroup(String name, StringBuilder sb, int modes) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("unknown group: \"" + name + "\""); return getGroup(id, sb); }
public boolean getGroup(String name, TextBuffer tb, int modes) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("unknown group: \"" + name + "\""); return getGroup(id, tb); }
public boolean getGroup(String name, TextBuffer tb, int modes) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("unknown group: \"" + name + "\""); return getGroup(id, tb); }
public boolean getGroup(String name, StringBuilder sb, int modes) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("unknown group: \"" + name + "\""); return getGroup(id, sb); }
/** * Returns the start index of the subsequence captured by the given * named-capturing group during the previous match operation. * * @param name The name of a named capturing group in this matcher's pattern * @return The index of the first character captured by the group, * or <tt>-1</tt> if the match was successful but the group * itself did not match anything */ @Override public int start(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return start(id); }
/** * Returns the offset after the last character of the subsequence captured * by the given named-capturing group during the previous match operation. * * @param name The name of a named capturing group in this matcher's pattern * @return The offset after the last character captured by the group, * or <tt>-1</tt> if the match was successful * but the group itself did not match anything */ @Override public int end(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return end(id); }
/** * Returns the start index of the subsequence captured by the given * named-capturing group during the previous match operation. * * @param name The name of a named capturing group in this matcher's pattern * @return The index of the first character captured by the group, * or <tt>-1</tt> if the match was successful but the group * itself did not match anything */ @Override public int start(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return start(id); }
/** * Returns the offset after the last character of the subsequence captured * by the given named-capturing group during the previous match operation. * * @param name The name of a named capturing group in this matcher's pattern * @return The offset after the last character captured by the group, * or <tt>-1</tt> if the match was successful * but the group itself did not match anything */ @Override public int end(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return end(id); }
/** * Returns the input subsequence captured by the given named group during the * previous match operation. * <br> * Like {@link #group(int) group} but for named groups instead of numbered. * @param name * The name of a capturing group in this matcher's pattern * * @return The (possibly empty) subsequence captured by the group * during the previous match, or <tt>null</tt> if the group * failed to match part of the input */ @Override public String group(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return group(id); }
/** * Returns the input subsequence captured by the given named group during the * previous match operation. * <br> * Like {@link #group(int) group} but for named groups instead of numbered. * @param name * The name of a capturing group in this matcher's pattern * * @return The (possibly empty) subsequence captured by the group * during the previous match, or <tt>null</tt> if the group * failed to match part of the input */ public String group(String name) { Integer id = re.groupId(name); if (id == null) throw new IllegalArgumentException("<" + name + "> isn't defined"); return group(id); }
/** * Just as above, yet with symbolic group name. * * @throws NullPointerException if there is no group with such name */ public Matcher matcher(MatchResult res, String groupName) { Integer id = res.pattern().groupId(groupName); if (id == null) throw new IllegalArgumentException("group not found:" + groupName); int group = id; return matcher(res, group); }
/** * Just as above, yet with symbolic group name. * * @throws NullPointerException if there is no group with such name */ public Matcher matcher(MatchResult res, String groupName) { Integer id = res.pattern().groupId(groupName); if (id == null) throw new IllegalArgumentException("group not found:" + groupName); int group = id; return matcher(res, group); }
void append(MatchResult match, TextBuffer dest, boolean pass) { if (!pass) { if (prefix != null) dest.append(prefix); if (index == null) return; int i = match.pattern().groupId(index); if (match.isCaptured(i)) match.getGroup(i, dest, modes); } }
void append(MatchResult match, TextBuffer dest) { if (prefix != null) dest.append(prefix); if (index == null) return; //if(id==null) return; //??? int i = match.pattern().groupId(index); if (match.isCaptured(i)) match.getGroup(i, dest, modes); }
void append(MatchResult match, TextBuffer dest) { if (prefix != null) dest.append(prefix); if (index == null) return; //if(id==null) return; //??? int i = match.pattern().groupId(index); if (match.isCaptured(i)) match.getGroup(i, dest, modes); }