You are hereRegex

Regex


Regex Archives

DFA / NFA to Regular Expression (without using GNFA)

The general approach to get a Regular expression (regex) from DFA/NFA is to convert a DFA to a GNFA by reducing states. Read more on wikipedia. However, for not too complicated DFA, it is often easier to get a regex from NFA instead of going through GNFA (which btw makes regex big).

Canada Postal Code & US Zip Code Regex

I decided to write a simple Canadian Postal Code and US Zip Code Regex. There are already good ones on the web, like here for example. But, I decided to write my own to make it slightly more accurate.