weighted-regexp-0.2.0.0: Weighted Regular Expression Matcher

Stabilityexperimental
MaintainerSebastian Fischer <mailto:sebf@informatik.uni-kiel.de>

Text.RegExp.Matching.Longest

Description

This module implements longest matching based on weighted regular expressions. It should be imported qualified as the interface resembles that provided by other matching modules.

Synopsis

Documentation

data Longest Source

Semiring used for longest matching.

Constructors

Zero 
One 
Longest !Int 

data Matching Source

A Matching records the leftmost start index of a matching subword.

Constructors

Matching 

Fields

matchingLength :: !Int

Length of the matching subword in the queried word.

Instances

matching :: RegExp c -> [c] -> Maybe MatchingSource

Returns the longest of all matchings for a regular expression in a given word.