regex-dfa-0.91: Replaces/Enhances Text.RegexContentsIndex
Text.Regex.DFA.EngineFPS
Description
This module is a modification of Text.Regex.Lazy.DFAEngine to search ByteStrings ( see http://www.cse.unsw.edu.au/~dons/fps/). This uses index to access the Word8 as a Char8.
Synopsis
findRegex :: Lexer -> ByteString -> (Int, Maybe (Int, Int))
countRegex :: Lexer -> ByteString -> Int
matchesHere :: Lexer -> ByteString -> Maybe Int
matchesRegex :: Lexer -> ByteString -> Bool
accept :: Regexp -> Lexer
Documentation
findRegex
:: LexerThe regular expression to match
-> ByteStringThe input string to scan along, looking for a match
-> (Int, Maybe (Int, Int))The length of the string before the match, Nothing if there was no match or Just length of the match, index of the input past the match
countRegex :: Lexer -> ByteString -> Int
This counts the number of matches to regex in the string, (it checks each possible starting position). This should be the same as ((length (splitRegex re input))-1) but more efficient
matchesHere :: Lexer -> ByteString -> Maybe Int
This checks the regex anchored at the start of the ByteString and return Nothing if there is no match or (Just n) for a match of length n
matchesRegex :: Lexer -> ByteString -> Bool
accept :: Regexp -> Lexer
Have a match to Regexp be consider a success
Produced by Haddock version 0.8