While searching for a unix problem, I came across the following string splitting regular expression statement:
string="abc@hotmail.com;xyz@gmail.com;uvw@yahoo.com"
str1=${string%%;*}
str2=${string##*;}
Result:
str1=abc@hotmail.com
str2=uvw@yahoo.com
I did not understand the second expression(str2).
Can please someone help.
Thanks
From the
bashmanual, underParameter Expansion: