You can take the derivative of a regular expression?
jvns.ca