doc / ch.tutteli.atrium.logic.creating.charsequence.contains.searchers.impl / RegexSearcher

RegexSearcher

class RegexSearcher : CharSequenceContains.Searcher<NoOpSearchBehaviour, Regex>

Represents a Searcher which evaluates the matches of a given regular expression on the input of the search.

It performs a non-disjoint search, meaning searching 'aa?' in 'aaaa' has 4 hits.

Constructors

<init>

RegexSearcher()

Represents a Searcher which evaluates the matches of a given regular expression on the input of the search.

Functions

search

fun search(searchIn: CharSequence, searchFor: Regex): Int

Searches in the given searchIn for the given searchFor, using its toString implementation, and returns the number of occurrences.