simplifies array creation using regex