All pastes #886262 Raw Edit

Someone

public text v1 · immutable
#886262 ·published 2008-01-31 15:42 UTC
rendered paste body
import Text.Regex 
import Data.Maybe (fromJust) 
mail :: Regex 
mail = mkRegex "[a-zA-Z0-9]+@[a-zA-Z0-9]+"

let mainmatch s = case m of { 
   Nothing -> _;
   Just (pre, mm, post, _) -> mm:mainmatch post  
   } 
   where m = Text.Regex.matchRegexAll mail s