HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleskylighting-core-0.14.1.2Haskell2010

Skylighting.Regex

  • 2 types
  • 7 values
datadata Regex
#
Instances3Show, Semigroup, Monoid
  • Show RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
  • Semigroup RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
  • Monoid RegexDefined in skylighting-core-0.14.1.2 · Regex.KDE.Regex
datadata RE
#

A representation of a regular expression.

Instances8Eq, Data, Ord, Read, Show, Binary, …
  • Eq REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Data REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Ord REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Read REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Show REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • Binary REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • FromJSON REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex
  • ToJSON REDefined in skylighting-core-0.14.1.2 · Skylighting.Regex

Match a Regex against a (presumed UTF-8 encoded) ByteString, returning the matched text and a map of (offset, size) pairs for captures. Note that all matches are from the beginning of the string (a ^ anchor is implicit). Note also that to avoid pathological performance in certain cases, the matcher is limited to considering 2000 possible matches at a time; when that threshold is reached, it discards smaller matches. Hence certain regexes may incorrectly fail to match: e.g. a*a{3000}$ on a string of 3000 as.