Using the Counter in Advanced Replace

Consider a list of items - you wish to number them sequentially.

Search <
Replacecnt": "
s_r_cnt/png

The list starts as
Item
Item
Item
Item
Item
Item

And after running the above Search and Replace on that list you get
1: Item
2: Item
3: Item
4: Item
5: Item
6: Item

< sets a flag that mark the start of a line.
cnt calls the Replace counter. In this case we wanted the count to use default values (start at 1, increment 1) so we did not need to click on the Counter in the Advanced Search and Replace dialog box to set anything.
": " is a string of literal characters (colon - space in this example) that are used just as they are.

Of course you could renumber paragraphs just as easily:

Search <<
Replacecnt": "

Other relevant pages

Top of page


Page Information

http://css.torrens.org/valid-html401-bluehttp://css.torrens.org/valid-css Document URI: http://stronged.torrens.org/man/search/examples/cnt.html
Page first published Monday the 1st of January, 2018
Last modified:Wed, 30 May 2018 09:33:41 BST
© 2017 - 2018 Richard Torrens.