SID-00057: Boolean "OR" search
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
5 |
| Category: |
CategorySearch |
Server OS: |
Fedora 10 |
Last update: |
16 years ago |
i need to do a formatted search of a form using an "OR" condition, of a two formfields.... i see and example where used and "AND" condition and tha was represented for an ";" sorry for my english i hope someone could understandme
--
PedroValenzuela - 27 Jan 2009
Discussion and Answer
OR es con una barra horizontal ( | ). Type debe ser "regex" (eso está en
RegularExpression)
%SEARCH{ "esto|OrEstoOtro" type="regex" ...
--
EnriqueCadalso - 30 Jan 2009
Thank you Enrique. In English for non-Spanish speaking people:
In a
RegularExpression search, an OR search can be done using parenthesis and vertical bars. To search for
"one" AND ("two" OR "three") you can specify this regular expression search:
%SEARCH{ "one;(two|three)" type="regex" .... Note that the semicolon specifies and AND search; it is a TWiki specific extension.
You can also use SQL-like queries, see
QuerySearch.
Related:
VarSEARCH,
FormattedSearch,
SearchPatternCookbook,
QuerySearch,
QuerySearchPatternCookbook,
RegularExpression
--
PeterThoeny - 01 Feb 2009
--
PedroValenzuela - 02 Feb 2009
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.