Note: I use "grep" here and in future videos, but I have an alias from grep to grep -P. The -P flag says to use Perl regular expressions, which is the style of regular expressions discussed in these videos. It's the most common regex style. Also, it contains features not available in the regular grep or in grep -E. You probably will want to add an alias also, or some very common things won't work
If you're having weird issues, you need to make sure that you put your pattern in quotes and that you're using zsh: csh, the default on myth, escapes characters and quotes characters weirdly.
Also, I said that an address should have "one or more" numbers and used [0-9]*. [0-9]* will match 0 or more numbers. To get one or more, you would need to use [0-9][0-9]* or [0-9]+
grep foo bar will match all lines that include "foo" in the file "bar". similarly, grep foo * will match all lines that include "foo" in all files in the current directory.
. (the dot character) matches one of any character.
* (the star character) matches zero or more of the previous character. Thus, .* matches zero or more of any character.
[0-9] matches all characters between 0 and 9. [ab] matches either a or b. [0-9a-zA-Z] matches any letter or number.
Exercises
Make a regular expression that will match every line. Use grep to test it out, and compare with the output from cat to make sure that they're the same.
Make a regular expression that will match every line of length 8 or more. Use grep to test it out. It should be the same as the previous one, but it won't include lines with just a few spaces and curly braces on them or blank lines.