If I understood correctly, OP wanted to ignore everything but alphabetic ("string") characters, as opposed to numbers ("no") and special characters. So the regex would have to be $regex = join "[^a-zA-Z]*", split //, $string;
Though the more I look at the question, the more it looks like an XY problem
In reply to Re^2: Getting element of array with a match
by Eily
in thread Getting element of array with a match
by shyamasoni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |