Click here to Skip to main content
15,942,793 members
Articles / General Programming / Regular Expressions

An Improved Algorithm for Converting State Machines to Regular Expressions

Rate me:
Please Sign up or sign in to vote.
4.99/5 (13 votes)
6 Jan 2022MIT9 min read 14.8K   120   5  
This article describes an improvement to the state removal algorithm for converting FAs to regular expressions
This article is primarily of interest to fellow eggheads like me who want to understand more about the mechanics of pattern matching streams using finite automata. In this case, I propose an improved algorithm for converting automatons into regular expressions that can be used to recreate them. The regular expressions created using this algorithm are more readable than those using the vanilla state-removal algorithm.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
United States United States
Just a shiny lil monster. Casts spells in C++. Mostly harmless.

Comments and Discussions