Class JdkMatcher


  • public class JdkMatcher
    extends Matcher
    • Constructor Detail

      • JdkMatcher

        public JdkMatcher​(String input,
                          Pattern pattern)
    • Method Detail

      • substitute

        public String substitute​(Substitution substitution)
        Description copied from class: Matcher
        Replace all matches in the input with a substitution. For every match substition.handleMatch is called.
        Specified by:
        substitute in class Matcher
        Parameters:
        substitution - Code which handles every substitution
        Returns:
        String with all matches substituted
      • substitute

        public String substitute​(String substitution)
        Description copied from class: Matcher
        Replace all matches in the input with a string substitution.
        Specified by:
        substitute in class Matcher
        Parameters:
        substitution - String to replace all matches
        Returns:
        String with all matches substituted
      • getMatcher

        protected Matcher getMatcher()
      • contains

        public boolean contains()
        Description copied from class: Matcher
        Test if a regular expression matches parts of the input
        Specified by:
        contains in class Matcher
        Returns:
        True if the regex matches a part of the input
      • matches

        public boolean matches()
        Description copied from class: Matcher
        Test if a regular expression matches the complete input
        Specified by:
        matches in class Matcher
        Returns:
        True if the regex matches the complete input