very helpful working with regex's. Lots of good examples.Also whats happening when you get an uninitialized value error is that part of your regular expression is not working and returning blank results within the (). Also I found tools like
or Eclipses regex tool to be helpful in debugging my regex commands.