Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can remove all those from the buffer with this command:</p> <pre><code>:%s!&lt;swf.\{-}/swf&gt;!! </code></pre> <p>if you also have tags that might be split on two lines, you can add the <code>\_</code> modifier to make <code>.</code> match newlines too:</p> <pre><code>:%s!&lt;swf\_.\{-}/swf&gt;!! </code></pre> <p>this assuming you want to remove both the tags and what they contain, if you just want to get rid of the tags and keep the content</p> <pre><code>:%s!&lt;/\?swf.\{-}&gt;!! </code></pre> <p>Notes:</p> <ul> <li>you don't need to escape <code>&lt;</code> or <code>&gt;</code></li> <li>you can choose whatever pattern delimiter you wish: Vim will use the first character you put after the <code>s</code> in the substitute command: this takes away the need to escape forward slashes in your pattern</li> </ul> <p>EDIT: extending my answer after your comment</p> <ul> <li>this is exactly like /STRING/REPLACE/g I only used a <code>!</code> instead of <code>/</code> so that I don't have to quote the backslash in the pattern (see my second point above)</li> <li>I didn't add the <code>g</code> modifier at the end since I have <code>:set gdefault</code> in my <code>.vimrc</code> since forever (it means that by default Vim will substitute all matches in a line instead of just the first, thus reverting the meaning of <code>/g</code>)</li> <li><code>\{-}</code> is the "ungreedy" version of the <code>*</code> quantifier, i.e. it matches 0 or more of the preceding atom but take <strong>as few as possible</strong> -- this helps you make sure that your search pattern will extend to the first "closing tag" instead of the last.</li> </ul> <p>HTH</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload