[GHC] #2540: [Text.Regex] incorrect word boundary ("\\b") substitutions

GHC trac at galois.com
Sun Aug 24 16:54:15 EDT 2008


#2540: [Text.Regex] incorrect word boundary ("\\b") substitutions
-------------------------------+--------------------------------------------
    Reporter:  Eelis-          |       Owner:                   
        Type:  bug             |      Status:  new              
    Priority:  normal          |   Component:  libraries (other)
     Version:  6.8.3           |    Severity:  normal           
    Keywords:  regex           |    Testcase:                   
Architecture:  x86_64 (amd64)  |          Os:  Unknown          
-------------------------------+--------------------------------------------
 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).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2540>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list