Improved regex comparator and removed rgx.c