I have question about regular expression.
There are two commands.
find / -regex '.*[^-_./0-9a-zA-Z].*' find /
If I'm right, these two commands should output same results. Because, the first command has regular expression
.* which appears at first. This means "Find any character and it can appear zero or more". This means all of the file name. Because file names consists of any character, including whitespace(" "),and it's not possible to appear zero character(It means file has no name). So, after all, I think they output same results.
But when I use these commands with
| wc -l , which means "output the lines of results", the results are different.
Am I missing something?