Regular expression with For each and split