Friday, August 9, 2013

vim: how to use back reference to compare strings?


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.
 
 

No comments: