|
[ ghc-Bugs-741600 ] Just (before,_,_,_) in Text.Regex.Posix.regex ec is : msg#00032lang.haskell.glasgow.bugs
Bugs item #741600, was opened at 2003-05-22 09:27 Message generated for change (Comment added) made by simonmar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=741600&group_id=8032 Category: hslibs/posix Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Simon Marlow (simonmar) Summary: Just (before,_,_,_) in Text.Regex.Posix.regexec is to short. Initial Comment: 6677 kleising@whale:~> ghci .... Prelude> :m Text.Regex.Posix Prelude Text.Regex.Posix> reg <- regcomp "ab" 0 Prelude Text.Regex.Posix> s <- regexec "ccab" Prelude Text.Regex.Posix> s <- regexec reg "ccab" Prelude Text.Regex.Posix> s Just ("c","ab","",[]) ----------------------------- in my opinion, this call has to return Just ("cc","ab","",[]). Sourcecode: -------------------------------- matched_parts :: String -> Ptr CRegMatch -> IO (String, String, String) matched_parts string p_match = do start <- (#peek regmatch_t, rm_so) p_match :: IO CInt end <- (#peek regmatch_t, rm_eo) p_match :: IO CInt let s = fromIntegral start; e = fromIntegral end return ( take (s-1) string, take (e-s) (drop s string), drop e string ) ----------------------------------- return ( take (s) string, instead of return ( take (s-1) string, ???? e-mail: kleising@xxxxxxxxxxxxxxxxx ---------------------------------------------------------------------- >Comment By: Simon Marlow (simonmar) Date: 2003-05-22 09:56 Message: Logged In: YES user_id=48280 Fixed, thanks. The fix will be in 6.0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=741600&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-741600 ] Just (before,_,_,_) in Text.Regex.Posix.regex ec is to short., SourceForge.net |
|---|---|
| Next by Date: | Re: Changes to make fptools insfrastructure usable for standalone libraries, Alastair Reid |
| Previous by Thread: | [ ghc-Bugs-741600 ] Just (before,_,_,_) in Text.Regex.Posix.regex ec is to short., SourceForge.net |
| Next by Thread: | [ ghc-Bugs-742220 ] readFile problems, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |