This site is designed to take advantage of CSS. If you are seeing this, CSS must not be available or enabled in your browser. Everything should still work, but won't be as pretty. :)
invers Software
 
HomeOpen Search & replace windowSearch & replace of simple textSearch and replace options
  Eddie > Block functions/Tools > Open Search & replace window Index

(Jokers)

Only in the full version of Eddie:

Whereas a normal search-text requires an exact match to the passage(s) to be found right down to one character, the use of jokers (wildcards) allows it to be formulated so that text portions with different contents and size can be found. Jokers are placeholders and represent any amount and kind of text, although this can be restricted as desired with respect to text length and composition.

Joker characters may be inserted in the search or also the replacement text with the Insert wildcard button. Let's start with the first. After insertion the text contains a control code-coloured abbreviation in curly brackets. The exact display of the joker depends on the parameters it contains, which can be set with the Edit control code function after a double-click on the joker in the following dialog box:

The upper portion corresponds to the Define joker character-set dialog for Define word hyphens. Here you can choose which characters and/or control codes may appear in the text encompassed by the joker. Below this are several editable fields: Minimum: ... characters as well as Maximum: ... characters determine how long the text portion may be that the joker matches. Every control code counts as exactly one character here. A 0 as the maximum removes the length restriction upwards, i.e. the found text part may be of any length.

Attention: The minimum value too may be zero! In this way you can define jokers that – in some circumstances – match text passages that are zero characters long.

The Name is optional and may be empty. It is required mainly when using replacement jokers, and so will be described later.

Finally there remain the radio buttons for selecting Fewest possible or Most possible. With this you inform Eddie whether the joker should encompass the smallest possible or the largest possible text passage.

The exact appearance of a joker in the search-text is determined by all these settings. Within the curly brackets there is first the minimum and maximum number of characters, separated by two dots. If one of these two values is at the limit (i.e. 0 or unrestricted), then it will be omitted completely. If both values are identical, then the two dots are omitted. If Most possible was selected, then two colons will replace the dots. After all this follows – if present – the name of the joker. Finally, an exclamation mark will be inserted right at the start if the joker is not to fit all characters and control codes.

This seems more complicated as it really is. Therefore a few examples follow:

{3..7}
A joker that encompasses a minimum of 3 and maximum of 7 characters (or control codes).
{1}
This joker matches just a single character.
{2..}
Joker that has to contain at least 2 characters.
{..10}
This time the minimum is 0, the maximum is 10, the text region found should be the greatest possible.
{..}
The number of characters is unrestricted.
{::}
Ditto; this joker applies to the complete text, as both length as well as contents of the text to be found are unrestricted and should have the greatest possible extent.
{!::}
Here too the length is unrestricted, though the text that is matched by the joker may not contain all possible characters and control codes (by opening the dialog you can determine which are permitted).

Examples of search-texts with jokers

To get some idea of the various things you can do with jokers you should try experimenting with them. We have put together a few examples to serve as suggestions. The search/replace setups included with the Eddie package can also be used for study purposes.

Word count

For this you enter a search-text that consists of a single joker. That joker is constructed in such a way that it matches complete words. With the aid of the Search global function you will get the number of text parts found and with that the number of words in the text.

Settings:

  • Minimum: 1 character
  • Maximum: 0 characters (0 = any amount)
  • Most possible
  • Permitted characters: Letters (click on the buttons in the following order: SelectInvertCapitalsLower case)

Find text in a given style

With this you can find text passages that are written in a given text style. The search-text consists of two parts: The style control code and the joker for the text.

Settings:

  • Minimum: 0 characters (i.e. even style control codes following directly after each other will be found)
  • Maximum: 0 characters (0 = any amount)
  • Most possible
  • Permitted characters: All apart from text styles (click on the buttons in the following order: Select – then switch off the text style symbol again)

Shrink multiple space characters to a single one

Raw texts frequently have accidentally typed twin space characters in them, which appear in the layout as disturbingly large separations between words. With a simple search/replace rule you can remove these quickly and easily. Space characters following directly after each other will be replaced by a single space in each case.

Settings:

  • Minimum: 2 characters
  • Maximum: 0 characters (0 = any amount))
  • Most possible
  • Permitted characters: Spaces (click on the buttons in the following order: SelectInvert – then select the space character once more)

Replacement text: A single space character


Examples of Replace jokers

The jokers become really interesting when they appear in the replacement text: In that case the text portions encompassed by the Search jokers may be used during replacement and reinserted into the main text together with the fixed parts of the replacement text.

{=Name}

To ensure unambiguous classification between Search and Replace jokers, all Search jokers that are also to appear in the replacement text must be assigned a name. The Replace jokers in turn contain the names of the Search jokers whose contents they are to adopt. Apart from that the Replace joker has no further settings. It will therefore be displayed only as an equality sign with a following name.

A double-click on a Replace joker opens a popup with the names of all Search jokers currently present, from which you can select one.

If two or more Replace jokers have the same name, then the contents of one and the same search jokers will be assigned to it. Incidentally the reverse case is also permitted: Two or more Search jokers may have the same name. In this special case the text passages which the jokers should match must have the same contents.

Some examples of replace-texts with jokers follow.

Proper opening and closing quotes
A text will be searched for passages that lie between two inch (") characters. These will be replaced by true opening and closing quote marks.

Settings:
  • Minimum: 1 character
  • Maximum: 0 characters (0 = any amount)
  • Most/Fewest possible has no effect
  • Permitted characters: Everything apart from opening and closing quote characters (click on the buttons in the following order: Select – then switch off all quote marks of any kind)
  • Name: Any (here: Text)

Assign a style for headings
In this example headings are recognized as such and are assigned a suitable text style. The identification of a heading naturally depends on the text being edited. Here we make the assumptions that the headings start with a number (chapter or section number), contains no hard line-ends and is followed by a blank line. In addition there must be at least one paragraph end before it.

Settings for joker Number:
  • Minimum: 1 character
  • Maximum: 1 character
  • Most/Fewest possible has no effect
  • Permitted characters: Numerals (click on the buttons in the following order: SelectInvertNumerals)

Settings for joker Heading:
  • Minimum: 1 character
  • Maximum: 0 characters (0 = any amount)
  • Most/Fewest possible has no effect
  • Permitted characters: Everything apart from line-ends (click on the buttons in the following order: Select – then switch off the line-ends)

Settings for joker Blank line:
  • Minimum: 2 characters
  • Maximum: 2 characters
  • Most/Fewest possible has no effect
  • Permitted characters: Line-ends (click on the buttons in the following order: SelectInvert – then switch on the line-ends)


Copyright © invers Software (Home)
Last updated on June 24, 2015

HomeOpen Search & replace windowSearch & replace of simple textSearch and replace options