the regex work that built the databse