On Tue, Feb 22, 2011 at 3:19 PM, Ed Avis <eda@waniasset.com> wrote: > Also useful would be something to disable the scanning behaviour of regexps and > force them to match the entire string. Three quarters of all regexp tests I > write look like /\A...\z/ and it would be handy to have a shortcut for this. Seconded. The grep command already have such switches: -x to match only entire lines, and -w to match only whole words. Perhaps we should use the switch /z to match only the entire string, /Z to match an entire string except possibly a final newline, /mZ to match an entire line, and /b to match an entire word only. AmbrusThread Previous | Thread Next