Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you only have to do it once, and never again, then doing it in an editor is fine. When you have to do it repeatedly then it becomes a major pain to do it manually, and that's when automation needs to kick in.</p> <p>Without a sample of the text containing the targets it is somewhat like shooting in the dark, however this seems close to your description using Ruby:</p> <pre><code>text = %{ [Lorem][] ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore [et][] dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi [ut][] aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse [cillum][] dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui [officia deserunt][] mollit anim id est laborum. } text.scan(/\[[^\]]+\]\[\]/).each_with_index{ |t, i| text[t] = t.sub('[]', "[#{1 + i}]") } puts text # &gt;&gt; # &gt;&gt; [Lorem][1] ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut # &gt;&gt; labore [et][2] dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco # &gt;&gt; laboris nisi [ut][3] aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in # &gt;&gt; voluptate velit esse [cillum][4] dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat # &gt;&gt; non proident, sunt in culpa qui [officia deserunt][5] mollit anim id est laborum. </code></pre>
    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. This table or related slice is empty.
    1. 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