Ticket #2540 (closed bug: fixed)
[Text.Regex] incorrect word boundary ("\\b") substitutions. Bug in regex-compat's subRegex handling of BOL flags.
| Reported by: | Eelis- | Owned by: | ChrisKuklewicz |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries (other) | Version: | 6.8.3 |
| Keywords: | regex regex-compat | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Consider:
import Text.Regex main = putStrLn $ subRegex (mkRegex "\\b(.)") "abcdef" "|\\1"
This outputs "|a|b|c|d|e|f", while it really should output "|abcdef" (at least according to Perl and Ruby).
Change History
Note: See
TracTickets for help on using
tickets.
