packages feed

regex-tdfa 1.3.2 → 1.3.2.1

raw patch · 3 files changed

+20/−18 lines, 3 filesdep ~bytestring

Dependency ranges changed: bytestring

Files

CHANGELOG.md view
@@ -1,6 +1,14 @@ For the package version policy (PVP), see  http://pvp.haskell.org/faq . -### 1.3.2+### 1.3.2.1++_2023-05-19, Andreas Abel_++- Fix haddock rendering of code examples in top-level documentation+  ([#50](https://github.com/haskell-hvr/regex-tdfa/issues/50))+- Tested with GHC 7.4 - 9.6++## 1.3.2  _2022-07-18, Andreas Abel_ 
lib/Text/Regex/TDFA.hs view
@@ -31,7 +31,6 @@  = Basics -@ >>> let emailRegex = "[a-zA-Z0-9+._-]+\\@[-a-zA-Z]+\\.[a-z]+" >>> "my email is first-name.lastname_1974@e-mail.com" =~ emailRegex :: Bool True@@ -45,6 +44,7 @@ >>> "#@invalid.com" =~ emailRegex :: Bool False +@ /-- non-monadic/ λ> \<to-match-against\> '=~' \<regex\> @@ -69,6 +69,7 @@ @ /-- returns empty string if no match/ a '=~' b :: String  /-- or ByteString, or Text.../+@  >>> "alexis-de-tocqueville" =~ "[a-z]+" :: String "alexis"@@ -76,24 +77,22 @@ >>> "alexis-de-tocqueville" =~ "[0-9]+" :: String "" -@- == Check if it matched at all  @ a '=~' b :: Bool+@  >>> "alexis-de-tocqueville" =~ "[a-z]+" :: Bool True -@- == Get first match + text before/after  @ /-- if no match, will just return whole/ /-- string in the first element of the tuple/ a =~ b :: (String, String, String)+@  >>> "alexis-de-tocqueville" =~ "de" :: (String, String, String) ("alexis-","de","-tocqueville")@@ -101,25 +100,23 @@ >>> "alexis-de-tocqueville" =~ "kant" :: (String, String, String) ("alexis-de-tocqueville","","") -@- == Get first match + submatches  @ /-- same as above, but also returns a list of just submatches./ /-- submatch list is empty if regex doesn't match at all/ a '=~' b :: (String, String, String, [String])+@  >>> "div[attr=1234]" =~ "div\\[([a-z]+)=([^]]+)\\]" :: (String, String, String, [String]) ("","div[attr=1234]","",["attr","1234"]) -@- == Get /all/ matches  @ /-- can also return Data.Array instead of List/ 'getAllTextMatches' (a '=~' b) :: [String]+@  >>> getAllTextMatches ("john anne yifan" =~ "[a-z]+") :: [String] ["john","anne","yifan"]@@ -127,8 +124,6 @@ >>> getAllTextMatches ("* - . a + z" =~ "[--z]+") :: [String] ["-",".","a","z"] -@- = Feature support  This package does provide captured parenthesized subexpressions.@@ -160,11 +155,9 @@ ASCII only, valid classes are alnum, digit, punct, alpha, graph, space, blank, lower, upper, cntrl, print, xdigit, word. -@ >>> getAllTextMatches ("john anne yifan" =~ "[[:lower:]]+") :: [String] ["john","anne","yifan"] -@  This package does not provide "basic" regular expressions.  This package does not provide back references inside regular expressions.
regex-tdfa.cabal view
@@ -1,6 +1,6 @@ cabal-version:          1.12 name:                   regex-tdfa-version:                1.3.2+version:                1.3.2.1  build-Type:             Simple license:                BSD3@@ -25,8 +25,9 @@   test/cases/*.txt  tested-with:-  GHC == 9.4.1-  GHC == 9.2.3+  GHC == 9.6.1+  GHC == 9.4.5+  GHC == 9.2.7   GHC == 9.0.2   GHC == 8.10.7   GHC == 8.8.4@@ -46,7 +47,7 @@ source-repository this   type:                git   location:            https://github.com/haskell-hvr/regex-tdfa.git-  tag:                 v1.3.2+  tag:                 v1.3.2.1  flag force-O2   default: False