| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| user:boolean_search [2026/05/17 19:55] – Fix Error-handling bullets: switch to <code> to avoid '...' parser confusion on apostrophes Claude.Ai | user:boolean_search [2026/05/17 19:59] (current) – Wrap quoted-syntax in %%-escapes; italicize prose UI labels; uniform ASCII straight quotes throughout Claude.Ai |
|---|
| |
| ^ Where ^ Trigger ^ | ^ Where ^ Trigger ^ |
| | Message base scan (main menu) | ''F'' — "Find Text in Messages" (''/F'' to scan all sub-boards) | | | Message base scan (main menu) | ''F'' — //Find Text in Messages// (''/F'' to scan all sub-boards) | |
| | Reading messages on a sub | ''F'' — "Find text" re-prompt inside the read loop | | | Reading messages on a sub | ''F'' — //Find text// re-prompt inside the read loop | |
| | Private mail (//Reading E-mail//) | ''/'' (slash) at the mail-read prompt | | | Private mail (//Reading E-mail//) | ''/'' (slash) at the mail-read prompt | |
| | File listings (file menu) | ''F'' — "Find Text in File Descriptions" (''/F'' for all dirs) | | | File listings (file menu) | ''F'' — //Find Text in File Descriptions// (''/F'' for all dirs) | |
| | File pager (''P_SEEK'', less-style)| ''/'' (slash) while viewing a file, bulletin, or log — ''n'' for next | | | File pager (''P_SEEK'', less-style)| ''/'' (slash) while viewing a file, bulletin, or log — ''n'' for next | |
| |
| Note: the file menu's ''S'' ("Search for Filename(s)") is a separate | Note: the file menu's ''S'' (//Search for Filename(s)//) is a separate |
| wildcard-pattern filename match (''*.zip'', ''WILD*.EXE'', etc.) and does | wildcard-pattern filename match (''*.zip'', ''WILD*.EXE'', etc.) and does |
| //not// use the boolean parser. Sysops with [[custom:command_shell|custom shells]] | //not// use the boolean parser. Sysops with [[custom:command_shell|custom shells]] |
| | ''1024x768 &! swim'' | contains ''1024x768'' and not ''swim'' | | | ''1024x768 &! swim'' | contains ''1024x768'' and not ''swim'' | |
| | ''(windows %%|%% dos) & modem !os/2'' | (''windows'' or ''dos'') and ''modem'', but not ''os/2'' | | | ''(windows %%|%% dos) & modem !os/2'' | (''windows'' or ''dos'') and ''modem'', but not ''os/2'' | |
| | ''"TEST"'' | the **word** ''TEST'' (won't match ''TESTING'' or ''BACKTEST'') | | | ''%%"TEST"%%'' | the **word** ''TEST'' (won't match ''TESTING'' or ''BACKTEST'') | |
| | ''"SMITH & JONES"'' | the literal phrase ''SMITH & JONES'', including the ''&'' | | | ''%%"SMITH & JONES"%%'' | the literal phrase ''SMITH & JONES'', including the ''&'' | |
| |
| ===== Syntax ===== | ===== Syntax ===== |
| |
| A bare term is any run of characters that doesn't include an operator | A bare term is any run of characters that doesn't include an operator |
| character (''&'', ''%%|%%'', ''!'', ''('', '')'', ''"''). Embedded | character (''&'', ''%%|%%'', ''!'', ''('', '')'', ''%%"%%''). Embedded |
| whitespace is part of the term — it does **not** mean implicit AND. So | whitespace is part of the term — it does **not** mean implicit AND. So |
| ''VGA monitor'' is one phrase that matches whenever ''VGA'' appears | ''VGA monitor'' is one phrase that matches whenever ''VGA'' appears |
| </code> | </code> |
| |
| A "word character" is any letter, digit, or underscore. Everything else | A //word character// is any letter, digit, or underscore. Everything else |
| (spaces, punctuation, brackets, etc.) is a boundary. | (spaces, punctuation, brackets, etc.) is a boundary. |
| |
| Quoted phrases preserve any internal whitespace and operator characters | Quoted phrases preserve any internal whitespace and operator characters |
| as literal content, with word-boundary checks applied to the outer ends | as literal content, with word-boundary checks applied to the outer ends |
| of the phrase. This is what makes ''"SMITH & JONES"'' searchable as a | of the phrase. This is what makes ''%%"SMITH & JONES"%%'' searchable as a |
| literal phrase including the ''&''. | literal phrase including the ''&''. |
| |
| |
| ^ You type ^ Behavior ^ | ^ You type ^ Behavior ^ |
| | ''"WORD"'' | whole-word match — both edges bounded | | | ''%%"WORD"%%'' | whole-word match — both edges bounded | |
| | ''" WORD"'' | trailing edge bounded only | | | ''%%" WORD"%%'' | trailing edge bounded only | |
| | ''"WORD "'' | leading edge bounded only | | | ''%%"WORD "%%'' | leading edge bounded only | |
| | ''" WORD "'' | no boundary check — pure substring match | | | ''%%" WORD "%%'' | no boundary check — pure substring match | |
| |
| This is what lets you, for instance, search for ''"co"'' to match the | This is what lets you, for instance, search for ''%%"co"%%'' to match the |
| abbreviation ''co.'' but not ''cocoa'' or ''coffee'', while ''" co "'' | abbreviation ''co.'' but not ''cocoa'' or ''coffee'', while ''%%" co "%%'' |
| still matches ''co'' anywhere including inside ''cocoa''. | still matches ''co'' anywhere including inside ''cocoa''. |
| |
| |
| If the parser can't understand your query, the BBS prints | If the parser can't understand your query, the BBS prints |
| <code>Invalid search expression: <reason></code> and returns you to the | ''%%Invalid search expression: <reason>%%'' and returns you to the |
| prompt (showing the inline help). Common reasons: | prompt (showing the inline help). Common reasons: |
| |
| * <code>unterminated quoted string</code> — a ''"'' opened a quoted phrase but no closing ''"'' was found | * ''unterminated quoted string'' — a ''%%"%%'' opened a quoted phrase but no closing ''%%"%%'' was found |
| * <code>expected ')'</code> — a ''('' opened a group but the matching '')'' is missing | * ''%%expected ')'%%'' — a ''('' opened a group but the matching '')'' is missing |
| * <code>expected search term</code> — an operator was followed by another operator or end of input | * ''expected search term'' — an operator was followed by another operator or end of input |
| * <code>unexpected '<char>' at offset N</code> — a stray '')'' or some other syntactically out-of-place character | * ''%%unexpected '<char>' at offset N%%'' — a stray '')'' or some other syntactically out-of-place character |
| |
| ===== Compatibility notes ===== | ===== Compatibility notes ===== |
| * **Standard precedence** (NOT > AND > OR) is used instead of //PCBoard//'s documented strict left-to-right, but the two only differ on hand-crafted examples that no published manual used. Add parentheses if you depend on a specific grouping. | * **Standard precedence** (NOT > AND > OR) is used instead of //PCBoard//'s documented strict left-to-right, but the two only differ on hand-crafted examples that no published manual used. Add parentheses if you depend on a specific grouping. |
| * An implicit AND is inserted before ''!'' / ''NOT'' (as in //Wildcat!//'s ''(windows %%|%% DOS) & (modem %%|%% comm) !OS/2'' example). //PCBoard// required the ''&'' to be explicit; the implicit form is more permissive but never changes the meaning of an already-valid //PCBoard// query. | * An implicit AND is inserted before ''!'' / ''NOT'' (as in //Wildcat!//'s ''(windows %%|%% DOS) & (modem %%|%% comm) !OS/2'' example). //PCBoard// required the ''&'' to be explicit; the implicit form is more permissive but never changes the meaning of an already-valid //PCBoard// query. |
| * //PCBoard// treated ''(text)'' (parens around a single word with no operator inside) as a search for the literal string ''(text)'' — including the parens. Synchronet always treats ''(...)'' as grouping, so ''(text)'' is equivalent to ''text''. If you want to search for parens literally, quote them: ''"(text)"''. | * //PCBoard// treated ''(text)'' (parens around a single word with no operator inside) as a search for the literal string ''(text)'' — including the parens. Synchronet always treats ''(...)'' as grouping, so ''(text)'' is equivalent to ''text''. If you want to search for parens literally, quote them: ''%%"(text)"%%''. |
| |
| ===== See Also ===== | ===== See Also ===== |