Is there any solution to create an alphabet with RexExp object? Is this possible ? As the result I wish to obtain an array with the length of 26 latin letters (law case). I tried to test my RegExp pattern /a-z+/g with help of String replace method, but it replaces a space by pattern literally, not by alphabet as I thought.
var test = " ";
var pattern = /a-z+/g;
var result = " ";
var text;
var arr;
alert(pattern.test("/a-z+/g"));
text = result.replace(test, pattern);
alert(text);
arr = text.split();
alert(arr.length);