superwick wrote:
> Hi,
> 
> I was trying to figure out how to take a string like this: "http://
> www.youtube.com/watch?v=QMuClxuWdH8"
> and removing everything before (and including) the "=", creating a new
> string with just "QMuClxuWdH8".
> 
> At first I thought I would have to do something like:
> 
> url = "http://www.youtube.com/watch?v=QMuClxuWdH8"
> rev_url = url.reverse
> rev_chomped = rev_url.chomp("=")
> code = rev_chomped.reverse
> 
> ...which doesn't actually work of course and is ugly anyway. I have a
> feeling I'll need to use regular expressions to do this, but I'm
> really lost when it comes to regex. How could I do something like
> this?

url[/\w+$/]

There are many ways to do this. This one makes sense if you know for 
sure that you want to grab all "word" characters (that is, [A-Za-z0-9_]) 
at the end of the string.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407