Package com.mckoi.database

## Interface RegexLibrary

All Known Implementing Classes:
  `JavaRegex`

    public interface RegexLibrary

An interface that links with a Regex library. This interface allows the database engine to use any regular expression library that this interface can be implemented for.

Author:
  Tobias Downer

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `regexMatch​(java.lang.String regular_expression, java.lang.String expression_ops, java.lang.String value)` Matches a regular expression against a string value.
`IntegerVector` `regexSearch​(Table table, int column, java.lang.String regular_expression, java.lang.String expression_ops)` Performs a regular expression search on the given column of the table.

### Method Detail

#### regexMatch

    boolean regexMatch​(java.lang.String regular_expression,
                       java.lang.String expression_ops,
                       java.lang.String value)

Matches a regular expression against a string value. If the value is a match against the expression then it returns true.

Parameters:
  `regular_expression` - the expression to match (eg. "[0-9]+").
  `expression_ops` - expression operator string that specifies various flags. For example, "im" is like '/[expression]/im' in Perl.
  `value` - the string to test.

#### regexSearch

    IntegerVector regexSearch​(Table table,
                              int column,
                              java.lang.String regular_expression,
                              java.lang.String expression_ops)

Performs a regular expression search on the given column of the table. Returns an IntegerVector that contains the list of rows in the table that matched the expression. Returns an empty list if the expression matched no rows in the column.

Parameters:
  `table` - the table to search for matching values.
  `column` - the column of the table to search for matching values.
  `regular_expression` - the expression to match (eg. "[0-9]+").
  `expression_ops` - expression operator string that specifies various flags. For example, "im" is like '/[expression]/im' in Perl.