The syntax for a Conversion File is:
• | Only lines beginning / or " are used. Others are ignored completely. |
• | Every string for conversion is of the form "A" -> "B". That is, the original string, the one you're searching for, enclosed in double quotes, is followed by a space, a hyphen, the > symbol, and the replacement string. |
• | You can use " (double quotes) and hyphen where you like without any need to substitute them, but for obvious reasons there must not be a sequence like " -> " in your search or replace string. |
Removing all tags
To remove all tags, choose "<*>" -> "" as your search string.
Control Codes
Control codes can be symbolised like this: {CHR(xxx)} where xxx is the number of the code. Examples: {CHR(13)} is a carriage-return, {CHR(10)} is a line-feed, {CHR(9)} is a tab. To represent <Enter> which comes at the end of paragraphs and sometimes at the end of each line, you'd type {CHR(13)}{CHR(10)} which is carriage-return followed immediately by line-feed.
Use {CHR(34)} if you need to refer to double inverted commas. See search-word syntax for more.
Wildcards
You may use the same wildcards as in Concord search-word syntax. To show a character is to be taken literally, put it in quotes (e.g. "*","<"). See below for use of the /L parameter.
Whole word, case Insensitive, Confirm, redundant Spaces, redundant <Enter>s
/C stops to confirm you wish to go ahead before each change.
/W does a whole word search (ensuring the alteration only happens if there's a word separator on either side) (/W "the" finds the but not other or then or bathe).
/I does a case insensitive search (/I "restaurant" -> "hotel" replaces restaurant with hotel and RESTAURANT with HOTEL and Restaurant with Hotel, i.e. respecting case as far as possible).
You can combine these, e.g.
/IWC "the" -> "this"
/S cuts out all redundant spaces. That is, it will reduce any sequence of two or more spaces to one, and it also removes some common formatting problems such as a lone space after a carriage-return or before punctuation marks such as .,; and ). /S can be used on a line of its own or in combination with other searches.
/E cuts out all redundant <Enter>s. That is, it will reduce any sequence of two or more carriage-return+line-feeds (what you get when you press Enter or Return) to one. /E can be used on a line of its own or in combination with other searches.
/L means both the search and replace strings are to be taken as literal. (Normally a sequence like <#*> would need quotes around each character, thus "<""#""*"">" which is tricky! Put /L at the start of the line to avoid this.)
See Documents\wsmith5 \convert.txt to see examples in use.
See also: Text Converter Contents.
Page url: http://www.lexically.net/downloads/version5/HTML/?converter_syntax_info.htm