Having never used `awk` before on Linux I am attempting to understand how it matches regular expressions. For example in the past based on my experience the regular expression `/2/` would match 2 in all of the following lines.

1. This will match 2
2. This will not match 2

Now if I run the command `awk '{if(NR~2)print}' sample.txt` which has the contents 

1. 2 will be matched
2. This will not match 2
3. 2 may be matched

The line that is matched is `This will not match 2` which indicates it is matching the line 2 because if I replace the command with `awk '{if(NR~3)print}' sample.txt` it matches `2 may be matched`. Now if I also run the command `awk '{if(NR~/^2$/)print}' sample.txt`, the matches the same exact line i.e. line 2.

However the source I am referring to at <http://www.youtube.com/watch?feature=player_detailpage&v=Htnno4CHVus#t=502s> seems to indicate otherwise.

What am I missing and how is the command `awk '{if(NR~2)print}' sample.txt` different to that of `awk '{if(NR~/^2$/)print}' sample.txt`?