Source: https://info.uqam.ca/~privat/INF1070/04-regex.pdf