Hi,
I am not sure if I understand you correctly but you can use \(...\) and
and then reuse it with \1 (it matches the same string as what \(...\)
have matched).
Regards,
Marcin
On 00:44 Sat 10 Aug , ping song wrote:
> hi guys:
> I run into a scenario that , I need to compare 2 part of the regex string
> in one line :
>
> "abc123456 bla bla bla abc1234"
>
> so I'm thinking, can we use the backreference, to compare the first abc\d\+
> with the second one and only print out a message in case we detect the
> different ones ? preferably if this can be done with one command...
>
> thanks!
>
> --
> --
> 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.
>
>
--
--
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.
Saturday, August 10, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment