skylighting-0.1.1.5: syntax highlighting library

Safe HaskellNone
LanguageHaskell2010

Skylighting.Regex

Synopsis

Documentation

data RE Source #

Instances

Show RE Source # 

Methods

showsPrec :: Int -> RE -> ShowS #

show :: RE -> String #

showList :: [RE] -> ShowS #

compileRegex :: Bool -> ByteString -> Regex Source #

Compile a PCRE regex. If the first parameter is True, the regex is case-sensitive, otherwise caseless. The regex is compiled from a bytestring interpreted as UTF-8. If the regex cannot be compiled, a RegexException is thrown.

convertOctalEscapes :: String -> String Source #

Convert octal escapes to the form pcre wants. Note: need at least pcre 8.34 for the form o{dddd}. So we prefer ddd or x{...}.