testing regex and slice methods