>Hi foks. > >How would I search for a regex within a particular area? The text >document is very long, and I don't want to match all instances, just >those I care about. I would probably select the text visually. > >Thanks in advance. >Afton.
A different question is easier to answer. How do I do something with a search expression within a visually selected area? That may get you the result you are looking for. 1. search for your regex in entire file: /textSearchingFor 2. visually select the area you care about 3. do something with visually selected lines and searched for stuff. Example: replace textSearchingFor with newText: :'<,'>s//newText The '<,'> that vim puts in when you type ':' while you have something visually selected makes the rest of the command only work within the visually selected area. Hope this helps, Brian