tearma.ie logainm.ie ainm.ie dúchas.ie gaois.ie scéalta nua/news · Fiontar agus Scoil na Gaeilge

Wildcards in advanced search

A clever way to make your Advanced Search more flexible is to use wildcards in the Foclaíocht/Wording box. A wildcard is a character which stands for other characters. These are the available wildcards:

Underscore: _

This represents any character. For example, if you search for l_w, you will find law and low, as well as the abbreviations lbw and LLW.

Percentage: %

This represents any number (including zero) of any characters. For example, if you search for met%rology, you will find metamorphic petrology and meteorology, as well as metrology.

Square brackets: [ ]

These give a choice of characters. For example, if you search for sociali[sz]ation, you will find every term which has Z or S in place of the brackets, that is, socialisation and socialization.

You can give a wider selection within the brackets, for example [aeiou], and a hyphen may also be used to indicate a range of characters: [a-h] is the same thing as [aábcdeéfgh], for example. Accented letters are included in these letter ranges. It does not make any difference whether you use lower-case or upper-case letters within the brackets as the whole search process is case-insensitive.

Circumflex: ^

If the circumflex is the first character within the brackets, the meaning of the brackets is changed: now they give the choice of every character other than the bracketed characters. For example, [^aeiou] means every character other than A, E, I, O, U. So, if you search for l[^aeoiu]w in English, you will find lbw and LLW but you won’t find law or low.

Making a pattern of wildcards

You can use any combination of characters and wildcards in a search, for example a[^aeiou]%d, a pattern which will result in every term which begins with A , the second character of which is any letter other than A E I O U and which ends in D. Note that the space, the comma, the hyphen and other punctuation symbols are also counted as characters. That is why you will find terms in which the second character is a space, if you search according to the above pattern.

The most powerful wildcard is the percentage symbol as it represents any number of any characters. If you only insert the percentage symbol in the search box, be careful: depending on the other criteria, that could result in every term in the database – so don’t be surprised if that search takes more time than an ordinary search.

Escaping wildcards

If you would like to use any one of the wildcards as a character rather than as a wildcard, insert the symbol \ (backslash) before it. This is called an escape technique, and the backslash is called an escape symbol. For example, instead of 90% capacity, write 90\% capacity. It is necessary to do this with the symbols _ (underscore), % (percentage), [ and ] (square brackets) anywhere in the text, and with the symbols ^ (circumflex) and - (hyhen) if they are enclosed in square brackets. If you want to use the backslash itself as a character instead of as an escape symbol, write another backslash in front of it: \\.

Sonraí téarmaíochta: © 2006–2017 Foras na Gaeilge
Réiteach teicniúil: © 2006–2017 Fiontar agus Scoil na Gaeilge