95-733 Internet Technologies
41
Regular Expressions
 
#split based on a space,period,comma followed
#by zero or more whitespace
line2 = "www.cmu.edu is where it's at."
arr = line2.split(/[ .,]\s*/)
puts arr



Output
======
www
cmu
edu
is
where
it's
at