I want to find a regex that will allow me to match uppercase, lowercase and spaces in between.
That is, below you can see a sample of what I want to collect.
id,name,continent
1,Louise,Latin America
2,Sasha,Asia
3,Mike,North America
What I am doing is that inside a while I check if the records comply with the regex. But I have found that those that have a space in between are not picked up (such as North America or Latin America). You can see my code here
while read line; do
if [["$line"=~^.*,.*,[a-zA-Z ]*
I've also tried [a-zA-Z\n]* but does not work.
Any idea?