1. A method for submatch extraction, the method comprising: receiving an input string; receiving a regular expression; and converting, by a processor, the regular expression with capturing groups into ordered binary decision diagrams (OBDDs) to extract submatches.