Robert Klemme wrote:
>some helpful crap
Thanks, this seems to work out fine.  I used hash keys just in case.  It 
is easier to type a site name than it is to type out a regular 
expression, and although I don't need to access the hash directly yet, 
well, you nevva know.

As for lambda, something I don't fully understand yet.  While I was 
pondering the solution I kind of had this weird feeling that it might be 
the solution, though.  I'll look into it.

Paul Stickney wrote:
> While not related to using gsub/regular expressions, consider an
> option like hpricot?

I just glanced at it, but I'm not sure why it would be a better option. 
In my case I wanted users to be able to embed videos in their comments, 
but they have no access to html, so I instead created this generic 
markup like (youtube:link) to accomplish the same ends.  I figured 
allowing them the option of using real HTML <embed> code would be too 
risky.  I don't know for sure whether or not there are malicious uses 
for <embed> but I imagined so.

-- 
Posted via http://www.ruby-forum.com/.