Adding advanced pattern support to PatternMatcher am: 2baf095ca9
am: 564d936eb1

Change-Id: I1c3619477b56c583c3d85f2185a1381676136293