|
Text.Regex.DFA.ByteString.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 |
|
|
|
Documentation |
|
findRegex |
:: Lexer | The regular expression to match
| -> ByteString | The 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 |