Tuesday, May 3, 2011

Re: Help me please ^^

Vim's regular expressions are far from standard. Just browse pattern.txt
and you will see many oddities documented or demonstrated, as well as
many extensions to facilitate things such as syntax highlighting. I'm
pretty sure most other Vi and Vi clone programs have their own oddities,
too.

I'm not sure whether Sed or Perl is more 'correct'. I haven't read any
POSIX specs.

Ben.

On 4/05/11 2:34 PM, HaoCheng Zhao wrote:
> Thanks guys ^_^
>
> So, shall we get the conclusion that:
> What sed does is correct according to POSIX, and VIM or PERL or some others still
> need a bit improve on handling zero-length matches?
>
> On Wed, May 4, 2011 at 7:03 AM, Ben Schmidt <mail_ben_schmidt@yahoo.com.au
> <mailto:mail_ben_schmidt@yahoo.com.au>> wrote:
>
> perl returns '1a11c1', BTW!
>
>
> Mmm. It's a bit debatable whether the second 1 in the 11 represents an
> overlapping match or not. That's the problem with zero-length matches
> that aren't solidly anchored; there are a lot of funny edge cases.
>
> Ben.
>
>
> --
> 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 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 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

No comments: