ifnotmatch

Purpose

Returns the argument if the condition is false.

Syntax

ifnotmatch(condition, argument_1)

The function is only used inside PDL-functions phrase(), follow(), near(), fnear(), sentence().

Arguments

The function accepts two mandatory arguments.

  1. The first argument is a condition to evaluate, which results in a true or false value.

  2. If the condition is true, the function returns the value of the condition.

Returned value

Documents matching the query.

Examples

phrase(0, adjective(), ifnotmatch(vehicle, town)) returns "new vehicle" in the text "We bought a new vehicle"and "American town" "I’m from a small Mexican American town in California".

phrase(verb(), ifnotmatch(preposition(), adverb())) returns "reading now" in the sentence "Become an Insider and start reading now" and returns "skyrocketed in" in the sentence "Properties in Austin have skyrocketed in value over the last 25 years".

fnear(4, contract, ifnotmatch(phrase(“No”, char(alnum)), entity(Dates))) finds Contract No if the contract number No is specified, otherwise finds the date of the contract.