moved the regex struct to it's own header, and added support for conversion to ranges