Sunday, February 2, 2014

Re: regular expression blindness

On 01.02.14 08:23, Tim Chase wrote:
> 2) if you just want to search, you can use the more complex pattern
>
> /^\(\.\/\)\@!

Yebbut, that's nearly 50% backslashes, so hard to read through the
picket fence. In less obsolete syntax it is:

/\v^(\.\/)@!

I.e. only the literalised magic chars need be escaped. The picket fence
of backslashes which do nothing useful is completely gone. :-)

Now if Vim had a config option to preset "\v" (posix ERE), then we'd be
in the 21st century at last.

Erik

--
... and to avoid the tedious repetition of these woordes 'is equal to'
I will sett, as I doe often in woorke use, a paire of parralelles or
twin lines of one length, thus = bicause no 2 things can be moare equal.
- Robert Recorde, writing in 1557 (quoted by Tubal Cain, in ME No. 4042)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: