Number Search
In order to find numbers, one can use the function number().
Syntax
This function has no required arguments. When called without arguments, the function matches all numbers.
Example
The arguments restriction_type, N1 and N2 are optional and are used to find numbers in a specific range. The restriction_type argument takes one of the following values:
Restriction type |
Explanation |
</less/lt |
number is less than N1 |
<=/le/less or equal/less_equal |
number is less than N1 or equal to N1 |
>/gt/greater |
number is greater than N1 |
>=/ge/greater or equal/greater_equal |
number is greater than N1 or equal to N1 |
=/eq/equal |
number is equal to N1 |
!=/ne/not equal/not_equal |
number is not equal to N1 |
()/bt/between |
number belongs to the interval (N1, N2) |
[]/be/between or equal/between_equal |
number belongs to the interval [N1, N2] |
(]/lo/left-open/left_open |
number belongs to the interval (N1, N2] |
[)/ro/right-open/right_open |
number belongs to the interval [N1, N2) |
Example
If the restriction_type consists of mathematical symbols, they should be enclosed in quotes (">", "()", "!=", etc.).
If the restriction_type consists of two or more words or contains a hyphen, it should also be enclosed in quotes ("not equal", "between or equal", "right-open").
The negative value of an argument should also be enclosed in quotes:
The function also supports an optional named parameter allow_multiword. If the option is enabled, numbers written in more than one words (two hundred, one million) are treated as a single unit and correctly converted into a numerical value. Using this option may result in performance loss. By default, allow_multiword:=no.
Example
In order to find numbers written in words, digits or numerals, one can use the optional named parameter type that takes one of the following values:
Value |
Explanation |
numeral |
numbers consisting of digits and symbols, permitted to use within numbers (e.g., dots, slashes etc.) |
digit |
numbers consisting of digits only, without any symbols, permitted to use within numbers |
word |
numbers written in words |
any |
numbers written in both words and digits |
Several types to search may be specified by a vertical bar ("|") character, e.g. type:=digit|word.
Example
Note
The function number() matches numbers written both in digits and in words.
In order to find only numbers written in digits, users can also use the query char(numeral, number()) or char(digit, number()).
In order to find only numbers written in words, users can use the query char(alpha, number()).
Learn more about the function char() at Punctuation and Special Symbols Search.