O'Reilly logo

Good Math by Mark C. Chu-Carroll

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bridging the Gap: From Regular Expressions to Machines

Earlier I said that when regular expression libraries are implemented in programming languages, the way that they work is by converting regular expressions to finite state machines and then using the FSM that they generated to process input strings.

Doing the translation from the regular expression to an FSM is interesting. There are several different ways of converting a regular expression to an FSM. It’s not a one-to-one translation. Depending on which method you choose, you can wind up with different FSMs for the same regular expression. (In fact, theoretically, there are an infinite number of different finite state machines for each regular expression!) Fortunately, that doesn’t matter, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required