By default, the search is case-insensitive. For example, the queries "Bio", "BIO", "bio" find the same matches ("Bio", "bio", "BIO", "BiO", "bIo", "bIO", "BIo", etc). To make search case-sensitive, use function case().

Syntax

case([cap_type,] term, term…​)

Example

case(Bill) matches word "bill" in titlecase ("Bill Hawkins", "Bill and Melinda Gates");

case(bill) matches word "bill" lowercase ("grocery bill", "a bill of material");

case(BIO) matches word "bio" in uppercase ("BIO").

The character or letter case can be also specified using first optional parameter cap_type which takes one of the following values:

lower

all letters of the word are in lowercase

upper

all letters of the word are in uppercase

title

the first letter is in uppercase, all subsequent letters are in lowercase

mixed

the word contains letters in upper and lower case in any combination

Example

case(title, dictword(Geoadministrative)) matches all the titlecase occurrences of the words from the Geoadministrative dictionary;

case(lower, "national park") matches all the lower occurrences phrase "national park" in any form ("national parks", "national park" but NOT "National Park");

case(upper, bio) = case(BIO) matches word "bio" in uppercase ("BIO").

If called with cap_type as single argument, the function returns all words in the specified capitalization type.

Example

case(mixed) matches all mixed-case words ("Hewlett-Packard", "SharePoint", "ChIP-Seq").

Task Example: Find Abbreviations

length(3,3, case(upper)) matches three-letter words in the upper case: SBS, USD, DNA.

pdl case 1

Note

A function with several arguments is equivalent to several functions with a single argument concatenated using the or operator:

Example

case(Park, Center, Drive) = case(Park) or case(Center) or case(Drive);

case(upper, park, center, drive) = case(upper, park) or case(upper, center) or case(upper, drive).