This small plugin/class can easily parse a string, and generate different kind of tokens. It’s very simple and straight-forward. It can perform as a base for other string parsing scripts, like templating engines, custom language interpreters, and many more.
Read the documentation to learn more and see a couple of code samples.