Examples of Advanced Description Searches
Below we give many of the advanced search options available with the two fieldsdescription
and
comment
. The example I give are all aimed at the description
field, but apply to either. The key
thing to note is that matches need only match part of the string--so a search using just 2
in the
description field will match a prime with a 2 anywhere in its description.
- An expression may begin with the word
NOT
(uppercase) to negate a search - Example:
NOT [2345]
will match the primes without the digits 2, 3, 4 or 5 in their descriptions- Example:
NOT .^
will match primes without the exponentiation operator - Example:
- An expression may contain the word
OR
(uppercase) to allow a boolean search - Example:
3^ OR 5^
will match the primes like Phi(3,-163195^8192) and 343372*3^178255-1- Example:
2^ OR 3^ OR 5^
will return mostly primes like 3*2^478785+1 (which greatly outnumber the previous types) - Example:
- An expression may begin with the character
^
(carat) which will only match at the beginning of the prime description. (Using^
anywhere else in the description field will simply match the exponentiation operator.) - Example:
^2
will match prime descriptions that begin with the digit 2.
Example:.^2
will match prime descriptions that have an exponent that begins with the digit 2. - An expression may end with the character
$
(dollar sign) which will only match at the end of the prime description. - Example:
2$
will match prime descriptions that end with the digit 2.
Example:$2
can not match any prime (how can 2 occur after the end?) - The character
.
(period) will match any single character - Example:
(..)
will match primes with two characters in a pair of parenthesis (e.g., 43013#*R(23)^11+1)
Example:..
will match everything on the list (as there are no one-character descriptions)
Example:^......$
will match every description with exactly six-characters.
Example:^.?3
will match description whose first or second character is 3. (The couplet.?
matches any 0 or 1 characters). - The character
%
(percent sign) will match any (0 or more) characters. - Example:
^2%1$
will match descriptions beginning with the digit 2 and ending with the digit 1 (with anything else in between)
Example:%
will match everything on the list.
+
, *
, (
and )
are quoted (to make
searching for algebraic expressions easy) eliminates many, but you can get around this by being creative and
using the fact MySQL represents many GRE expressions using [
, ]
, {
, }
, and :
.
Example:Internally^[123]{3,}[[:digit:]]{3,}*
will match those beginning with at least three digits from the set {1,2,3} followed by at least three more digits (0 through 9).
Example:^[[:alpha:]]{1,2}(
will match those beginning with one or two letters followed by a parenthesis.
%
is translated to the GRE '.*'.
Printed from the PrimePages <t5k.org> © Reginald McLean.