Awesome REGEX code
Fixed error that made X !-> 0 for a-> 1