Welcome to regular expressions. The man page is your best place to start, though it is pretty terse, it will give a quick idea on the command its self.
http://www.regular-expressions.info/
is a very, very good jumping off point, I can't recommend it enough. By the way, the latter part of those commands (../filename) is a tad bizarre if you're running a lot of these, why not cd to where you need to be?