Class RegExList


public class RegExList extends RegEx
Combines one or more RegEx together, by successively trying to match each RegEx until success.

The order of RegExes in the list determines the order that matching is tried.

Author:
Owen Feehan
  • Constructor Details

    • RegExList

      public RegExList()
  • Method Details

    • match

      public Optional<String[]> match(String string)
      Description copied from class: RegEx
      Returns an array of string components it matches successfully, or Optional.empty() if it cannot match.
      Specified by:
      match in class RegEx
      Parameters:
      string - string to match against the regular-expression.
      Returns:
      an array of string components representing each group in the match, or Optional.empty() if no match is possible.
    • toString

      public String toString()
      Description copied from class: AnchorBean
      By default, we use AnchorBean.describeBean() as the string representation of the bean.
      Overrides:
      toString in class AnchorBean<RegEx>
      Returns:
      the string representation
    • getList

      public List<RegEx> getList()
      The list of RegExes that are successively tried to be matched.
    • setList

      public void setList(List<RegEx> list)
      The list of RegExes that are successively tried to be matched.