From: Chris Eidhof Date: 2005-06-16T06:52:56+09:00 Subject: Re: Regex help On Thu, Jun 16, 2005 at 06:44:50AM +0900, Ezra Zygmuntowicz wrote: > Hello list! > Could someone help me do a little regex conversion? I've got a > few perl compatible regexes from a php script I am trying to port to > ruby but I need a little help. Here are the php functions: > $buffer = preg_replace("#(? [a-zA-Z]{2,4}(?:/[^ \n\r\"\'<]+)?#", "http://$0", $buffer); > $buffer = preg_replace("#(? (?:http:\/\/|https:\/\/|ftp:\/\/)(?:[a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,4} > (?::[0-9]+)?(?:/[^ \n\r\"\'<]+)?#", " > $0", $buffer); > $buffer = preg_replace("#(?<=[\n ])([a-z0-9\-_.]+?)@([^,< \n\r]+)#i", > "$0", $buffer); I'm willing to help, but could you give a little more detail on what the regexen should do? -- Best regards, Chris Eidhof