[1.7.x] Fixed #23578 -- Changed examples to use patterns