I think that is looking rather good. I found one other way of doing it, but still using stringr, just a different function and extracting groups of interest:
library("stringr")
myString = "normal(0,1)"
parameters = str_match(myString, "(\\w+)\\((\\d*\\.?\\d*),\\s?(\\d*\\.?\\d*)\\)")
distribution = parameters[2]
mu = as.numeric(parameters[3])
md = as.numeric(parameters[4])
This regex should work for both integers and decimal numbers and ignore any white space after the comma if it would be inserted.