Split pure regex functionality into slre.[ch]