I am learning regexes and found some codes so I tested in my terminal and got results given below
$ echo "my version 3.8.0" | grep -o '[0-9.]*'
3.8.0
$ echo "my version 3.8.0" | grep -o '[0-9]*'
3
8
0
$ echo "my version 3.8.0" | grep -o '[0-9]'
3
8
0
Why last two expressions are giving same output so I want to know how ? And one more thing , the first expression output is in one line where rest two expressions output is in multiple lines why ? I am new to regexes and its very confusing
Finally I am just want to know the working flow of above expressions or line of code