First, visually select the area you want to search in. Enter the normal mode. Then hit / and type this in the search bar: \%Vpattern