This question hit the R-help list, and I thought I'd list all the given solutions, including mine using regular expressions:
This person had a variable 'x':
x [1] "2005-09-01"
And he wanted to create three variables, y, m, and d, such that:
y = 2005
m = 09
d = 01