On 06/20/2011 12:22 PM, rameo wrote:
myem...@mydomain.com hello myotherem...@mydomain.com
hello mylatestem...@mydomain.co.uk
Putting that in your command gives an empty output (it removes the
emails).
Ah...with that context, I might try to approach the problem
differently. If you don't
On 06/20/2011 07:19 AM, rameo wrote:
On Jun 20, 1:50 am, Tim Chasev...@tim.thechases.com wrote:
hello this is an example, hello to everybody
example hello
I do a search for hello
My output has to be:
hellohello
hello
or
hello hello
hello
My first thought would be something
Hi TIm,
this is the output of the text when I use your command %s/\w\+/
\=submatch(0)=~'hello'?submatch(0):'' :
hello this is an example, hello to everybody
hello
this is the output of the text when I use your command %s/\w\+\W*/
\=submatch(0)=~'hello'?submatch(0):'' :
hello this is an
On 06/20/2011 10:00 AM, rameo wrote:
hello this is an example, hello to everybody
hello
this is the output of the text when I use your command %s/\w\+\W*/
\=submatch(0)=~'hello'?submatch(0):'' :
hello this is an example, hello to everybody
hello
Ah...it looks like it was missing the g
Thank you, yes now it works with hello.
It doesn't work p.e. with emails.
This is my command to search emails:
\([A-Z0-9+_.-]\+@\([A-Z0-9-]\+\.\)\+[A-Z]\{2,6}\)
p.e.
myem...@mydomain.com hello myotherem...@mydomain.com
hello mylatestem...@mydomain.co.uk
Putting that in your command gives an
On 06/20/2011 11:35 AM, rameo wrote:
This is my command to search emails:
\([A-Z0-9+_.-]\+@\([A-Z0-9-]\+\.\)\+[A-Z]\{2,6}\)
p.e.
myem...@mydomain.com hello myotherem...@mydomain.com
hello mylatestem...@mydomain.co.uk
Putting that in your command gives an empty output (it removes the
emails).
Hi,
Thank you for replying.
I use this command to put all matches on a new line:
:let @a=CR:%s//\=setreg('A', submatch(0), 'l')/gCR:%d _CR:put
aCR:0d _CR
I can't find out how to keep them on the same line.
I tried this command:
%s/\(^\|\(hello\)\@=\).\{-}\($\|hello\)\@=//g
It works with text
Hi,
I would like to know how to remove everything except pattern.
p.e.
hello this is an example, hello to everybody
example hello
I do a search for hello
My output has to be:
hellohello
hello
or
hello hello
hello
using :%s//\=setreg('A', submatch(0), 'l')/g
puts every hello on a new
On 06/19/2011 11:15 AM, rameo wrote:
I would like to know how to remove everything except pattern.
p.e.
hello this is an example, hello to everybody
example hello
I do a search for hello
My output has to be:
hellohello
hello
or
hello hello
hello
My first thought would be something