Thanks for the response. Though correct, I am trying to get around multiple passes and extra complexity. Ideally I am looking for something to first identify a series of scopes via REGEX and then do a regular search and replace on these scopes ignoring anything outside those scopes. This is a common problem to solve in config management. I am thinking there might be an easy way to do this since it is built in vi which came long before perl. There isn't anything in the new features additions in regex with 5.10 are there?
Comment on Re^2: Search and Replace Within Subscopes