Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Wildcard Matches

The match() function does exact 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

Wildcard string match

Wildcard string non-match

Wildcard end-string match

Wildcard end-string non-match

Wildcard mid-string match

Wildcard mid-string non-match

Previous Topic

Next Topic

Wildcard string match

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

"match( name, \"M.c.a*\" ) == 1"

Previous Topic

Next Topic

Wildcard string non-match

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

"match( name, \"M.c.a*\" ) == 0"

Previous Topic

Next Topic

Wildcard end-string match

Include records where the 3 rightmost characters in a "name" field match the wildcard string "A.i". Matches include strings like "Muhammad Ali".

"match( right(name,3), \"A.i\" ) == 1"

Previous Topic

Next Topic

Wildcard end-string non-match

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

"match( right(name,3), \"A.i\" ) == 0"

Previous Topic

Next Topic

Wildcard mid-string match

Include records where the 3rd and 4th characters in a "name" field match the wildcard string "c.". Matches include strings like "Michael Jordan" and "Michael Schumacher".

"match( substring(name,3,2), \"c.\" ) == 1"

Previous Topic

Next Topic

Wildcard mid-string non-match

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

"match( substring(name,3,2), \"c.\" ) == 0"

TOCIndex