Forum Moderators: goodroi
User-agent: *
Disallow: /dir1/dir2/
Depending on the structure of dir1 you can implicity allow dir2 by not disallowing it:
User-agent: *
Disallow: /dir1/dir3/
Disallow: /dir1/dir4/
Disallow: /dir1/dir5/
But, this also implicity allows any pages in dir1 itself, such as /dir1/example.htm.
More info at robotstxt.org [robotstxt.org].