Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Case insensitive wildcard Matches

The matchi() function does case insensitive string comparisons using wildcard characters. It returns 1 when the comparison matches and 0 when it does not.

The period "." character matches any one character.

The asterisk "*" character matches any number of characters; thus, when the asterisk character is used, it should be the last wildcard character.

In This Section

Case insensitive wildcard string match

Case insensitive wildcard string non-match

Case insensitive wildcard end-string match

Case insensitive wildcard end-string non-match

Case insensitive wildcard mid-string match

Case insensitive wildcard mid-string non-match

Previous Topic

Next Topic

Case insensitive wildcard string match

Include records where the characters in a "name" field match the wildcard string "M.c.a*" while doing a case insensitive comparison. Matches include "Michael Jordan" and "Michael Schumacher".

"matchi( name, \"m.c.a*\" ) == 1"

Previous Topic

Next Topic

Case insensitive wildcard string non-match

Include records where the characters in a "name" field do not match the wildcard string "M.c.a*" while doing a case insensitive comparison. Matches include strings like "Babe Ruth", "Pele", and "Wayne Gretzky", but not "Michael Jordan", "Michael Schumacher", and "Muhammad Ali".

"matchi( name, \"M.C.A*\" ) == 0"

Previous Topic

Next Topic

Case insensitive wildcard end-string match

Include records where the 3 rightmost characters in a "name" field match the wildcard string "A.I" while doing a case insensitive comparison. Matches include strings like "Muhammad Ali".

"matchi( right(name,3), \"A.I\" ) == 1"

Previous Topic

Next Topic

Case insensitive wildcard end-string non-match

Include records where the 3 rightmost characters in a "name" field do not match the wildcard string "a.i" while doing a case insensitive comparison. Matches include strings like "Babe Ruth", "Pele", and "Wayne Gretzky", but not "Muhammad Ali".

"matchi( right(name,3), \"a.i\" ) == 0"

Previous Topic

Next Topic

Case insensitive wildcard mid-string match

Include records where the 3rd and 4th characters in a "name" field match the wildcard string "C." while doing a case insensitive comparison. Matches include strings like "Michael Jordan" and "Michael Schumacher".

"matchi( substring(name,3,2), \"C.\" ) == 1"

Previous Topic

Next Topic

Case insensitive wildcard mid-string non-match

Include records where the 3rd and 4th characters in a "name" field do not match the wildcard string ".H" while doing a case insensitive comparison. Matches include strings like "Babe Ruth", "Pele", "Muhammad Ali", and "Wayne Gretzky", but not "Michael Jordan" and "Michael Schumacher".

"matchi( substring(name,3,2), \".H\" ) == 0"

Previous Topic

Next Topic

Compare string fields in the same record

You can compare the values of two fields in the same record.

"name == favoritesaying"

"name != favoritesaying"

"name >= favoritesaying"

"strncmp( name, favoritesaying, 1 ) > 0"

"stricmp( name, favoritesaying ) == 0"

"strnicmp( name, favoritesaying, 1 ) > 0"

TOCIndex