module Regex.Internal.CharSets
( digit
, word
, space
, ascii
, asciiAlpha
, asciiUpper
, asciiLower
) where
import Regex.Internal.CharSet (CharSet)
import qualified Regex.Internal.CharSet as CS
digit :: CharSet
digit :: CharSet
digit = (Char, Char) -> CharSet
CS.fromRange (Char
'0',Char
'9')
word :: CharSet
word :: CharSet
word = CharSet
asciiUpper CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> CharSet
asciiLower CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> CharSet
digit CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> Char -> CharSet
CS.singleton Char
'_'
space :: CharSet
space :: CharSet
space = [Char] -> CharSet
CS.fromList [Char]
"\t\n\r\f\v"
CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> [Char] -> CharSet
CS.fromList [Char]
"\x0020\x00A0\x1680\x202F\x205F\x3000"
CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> (Char, Char) -> CharSet
CS.fromRange (Char
'\x2000',Char
'\x200A')
ascii :: CharSet
ascii :: CharSet
ascii = (Char, Char) -> CharSet
CS.fromRange (Char
'\0',Char
'\127')
asciiAlpha :: CharSet
asciiAlpha :: CharSet
asciiAlpha = CharSet
asciiUpper CharSet -> CharSet -> CharSet
forall a. Semigroup a => a -> a -> a
<> CharSet
asciiLower
asciiUpper :: CharSet
asciiUpper :: CharSet
asciiUpper = (Char, Char) -> CharSet
CS.fromRange (Char
'A',Char
'Z')
asciiLower :: CharSet
asciiLower :: CharSet
asciiLower = (Char, Char) -> CharSet
CS.fromRange (Char
'a',Char
'z')