|
| Text.Regex.Posix | | Portability | non-portable (needs POSIX regexps) | | Stability | experimental | | Maintainer | libraries@haskell.org |
|
|
|
|
|
| Description |
| Interface to the POSIX regular expression library.
|
|
| Synopsis |
|
|
|
|
| The Regex type |
|
| data Regex |
| A compiled regular expression |
|
|
| Compiling a regular expression |
|
| regcomp |
| :: String | The regular expression to compile | | -> Int | Flags (summed together) | | -> IO Regex | Returns: the compiled regular expression | | Compiles a regular expression |
|
|
| Flags for regcomp |
|
| regExtended :: Int |
|
| regIgnoreCase :: Int |
|
| regNewline :: Int |
|
| Matching a regular expression |
|
| regexec |
| :: Regex | Compiled regular expression | | -> String | String to match against | | -> IO (Maybe (String, String, String, [String])) | Returns: Nothing if the regex did not match the
string, or:
Just (everything before match,
matched portion,
everything after match,
subexpression matches)
| | Matches a regular expression against a string |
|
|
| Produced by Haddock version 0.6 |