private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
final int end = source.length(); Matcher m = Pattern.compile("dummy").matcher(source); m.useTransparentBounds(true).useAnchoringBounds(false); while (pos < end)
/** * Sets the anchoring of region bounds for this matcher. * * @param b a boolean indicating whether or not to use anchoring bounds. * @return this Matcher */ public Matcher useAnchoringBounds(boolean b) { matcher.useAnchoringBounds(b); return this; }
/** * Sets the anchoring of region bounds for this matcher. * * @param b a boolean indicating whether or not to use anchoring bounds. * @return this Matcher */ public Matcher useAnchoringBounds(boolean b) { matcher.useAnchoringBounds(b); return this; }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
/** * Throw an exception if the sequence name is not valid. */ public static void validateSequenceName(final String name) { if (!LEGAL_RNAME_PATTERN.matcher(name).useAnchoringBounds(true).matches()) { throw new SAMException(String.format("Sequence name '%s' doesn't match regex: '%s' ", name, LEGAL_RNAME_PATTERN)); } }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
/** * Throw an exception if the sequence name is not valid. */ public static void validateSequenceName(final String name) { if (!LEGAL_RNAME_PATTERN.matcher(name).useAnchoringBounds(true).matches()) { throw new SAMException(String.format("Sequence name '%s' doesn't match regex: '%s' ", name, LEGAL_RNAME_PATTERN)); } }
private void resetMatcher() { if (matcher == null) { matcher = delimiter.matcher(buffer); } else { matcher.reset(buffer); } matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); matcher.region(findStartIndex, bufferLength); }
public RgxReader(CharBuffer source) { pattern = Pattern.compile(EVENT_RGX, Pattern.DOTALL); buf = source; matcher = pattern.matcher(buf); buf.position(position); matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); result = new ArrayList<>(limit); }
/** * @return Returns the matcher that can be used with a {@link RegexModifier} to match an alternative of tokens */ protected OnStreamMatcher createMatcher(String regexTokenAlternatives) { // use the default implementation Matcher matcher = Pattern.compile(regexTokenAlternatives, 0).matcher(""); matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); return new OnStreamStandardMatcher(matcher); }
/** * @return Returns the matcher that can be used with a {@link RegexModifier} to match an alternative of tokens */ protected OnStreamMatcher createMatcher(String regexTokenAlternatives) { // use the default implementation Matcher matcher = Pattern.compile(regexTokenAlternatives, 0).matcher(""); matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); return new OnStreamStandardMatcher(matcher); }
/** * See {@link #RegexModifier(String, int, String, int, int)}. */ public RegexModifier(String regex, int flags, MatchProcessor matchProcessor, int minimumLengthOfLookBehind, int newNumberOfChars) { Matcher jdkMatcher = Pattern.compile(regex, flags).matcher(""); jdkMatcher.useTransparentBounds(true); jdkMatcher.useAnchoringBounds(false); init(new OnStreamStandardMatcher(jdkMatcher), matchProcessor, minimumLengthOfLookBehind, newNumberOfChars); }
/** * See {@link #RegexModifier(String, int, String, int, int)}. */ public RegexModifier(String regex, int flags, MatchProcessor matchProcessor, int minimumLengthOfLookBehind, int newNumberOfChars) { Matcher jdkMatcher = Pattern.compile(regex, flags).matcher(""); jdkMatcher.useTransparentBounds(true); jdkMatcher.useAnchoringBounds(false); init(new OnStreamStandardMatcher(jdkMatcher), matchProcessor, minimumLengthOfLookBehind, newNumberOfChars); }
protected OnStreamMatcher createMatcher(String regex, int flags) { Matcher matcher = Pattern.compile(regex, flags).matcher(""); matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); return new OnStreamStandardMatcher(matcher); }
protected OnStreamMatcher createMatcher(String regex, int flags) { Matcher matcher = Pattern.compile(regex, flags).matcher(""); matcher.useTransparentBounds(true); matcher.useAnchoringBounds(false); return new OnStreamStandardMatcher(matcher); }