Search and Replace (Replace)

 

 

Some lists, such as lists of filenames, allow for searching and replacing.

 

The point of it

If your text data has been moved from one PC to another, or one drive to another, it will be necessary to edit all the filenames if WordSmith ever needs to get at the source texts, such as when computing a concordance from a word list.)

 

Search & Replace for filenames

 

If you are replacing a filename you will see something like this. We distinguish between the path and the file's individual name, so that for a case like C:\texts\BNC\spoken\s conv\KC2.txt the filename is KC2.txt and the path to it is C:\texts\BNC\spoken\s conv.

To correct the path to the file, e.g. if you've moved your BNC texts to drive Q:\my_moved_texts you might simply replace as shown here

 

filename_search_replace_path

and all the filenames which contain c:\texts will get Q:\my_moved_texts e.g. C:\texts\BNC\spoken\s conv\KC2.txt will become Q:\my_moved_texts\BNC\spoken\s conv\KC2.txt.

 

To rename a filename only, change the radio buttons in the middle of the window and the search and replace operation will ignore the path but replace within the filename only.

 

Search & Replace for other data

 

In this case the search & replace isn't of filenames but in the case below in Viewer and Text Aligner, of the actual text. Like a search operation, the search operates on the current column of data.

 

search with replace

The context line shows what has been found.

The line below shows what will happen if you agree to the change.

 

Yes: make 1 change (the highlighted one), then search for the next one

Skip: leave this one unchanged, search for the next one

Yes All: change without any check

Skip All: stop searching...

 

Whole word – or bung in an asterisk

The syntax is as in Concord, so by default a whole word search. To search for a suffix or prefix, use the asterisk. Thus *ed will find any entry ending in ed; un* will find any entry starting with un. *book* will find any entry with book in it (book, textbook, booked.)

 

Word lists can be sorted by suffix: see WordList sorting.

 

See also: Searching by Typing, Searching with F12, Accented Characters & Symbols.

Click the Permalink button if you want to copy a link to this page.