Generate Regex Pattern From String To Array