Monday, December 12, 2016

Re: how to delete specified pattern

Sand Glass wrote:
> On Sunday, December 11, 2016 at 5:16:07 PM UTC+8, Sand Glass wrote:
>> I want to delete the <*> pattern , how should I do?
>>
>> 00:00:00.000 --> 00:00:02.129 align:start position:0%
>>
>> hello<00:00:00.900><c> guys</c><00:00:01.020><c> today</c><c.colorE5E5E5><00:00:01.620><c> is</c><00:00:01.949><c> our</c></c><00:00:02.129><c> first</c>
>>
>> 00:00:02.129 --> 00:00:02.310 align:start position:0%
>> hello guys today<c.colorE5E5E5> is our</c> first
>>
>>
>> 00:00:02.310 --> 00:00:04.500 align:start position:0%
>> hello guys today<c.colorE5E5E5> is our</c> first
>> <c.colorE5E5E5>view</c><00:00:02.820><c> about</c><00:00:03.149><c> the</c><c.colorCCCCCC><00:00:03.330><c> micro</c></c><00:00:03.750><c> base</c><c.colorE5E5E5><00:00:03.990><c> is</c></c><00:00:04.500><c> a</c>
> this is work
> :%s/<[\x00-\x3d\x3f-\xff]\+]>//g
>
> by the way, in windows environment, how can I copy command line to clipboard?
> I select and try 'y' or 'Ctrl+c', not worked.

A couple of solutions to your substitute question:

:%s/<[^>]*>//g
:%s/<.\{-}>//g

Regards,
Chip Campbell

--
--
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/d/optout.

No comments: