Skip to content

Multiline option appears to be ignoredΒ #11

Open
@raxod502

Description

@raxod502

In GHCI:

Text.Regex.TDFA> "f" =~~ "." :: Maybe String
Just "f"
Text.Regex.TDFA> "\n" =~~ "." :: Maybe String
Nothing

The documentation says multiline matching should be enabled by default, but just to double-check, I tried enabling it explicitly:

Text.Regex.TDFA> (makeRegexOpts defaultCompOpt { multiline = True } defaultExecOpt "." :: Regex) `matchM` "f" :: Maybe String
Just "f"
Text.Regex.TDFA> (makeRegexOpts defaultCompOpt { multiline = True } defaultExecOpt "." :: Regex) `matchM` "\n" :: Maybe String
Nothing

No luck. The same thing happens for inverted character classes (e.g., [^&] instead of .). Am I misunderstanding how to get my regex to match newlines?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions