SID-01708: Formatted Search with a unique Condition
| Status: |
Answered |
TWiki version: |
5.1.3 |
Perl version: |
|
| Category: |
CategorySearch |
Server OS: |
|
Last update: |
10 years ago |
Is it possible to create a formatted search that displays all topics in a web where the first letter of the topic name is a specific letter.
For example, a search to display all topics in the web that begin with the letter 'a'. I am not quite sure if string manipulation is possible in Twiki's markup languge.
Thanks for your help,
James
--
James DiDonato - 2013-05-24
Discussion and Answer
This is a simple SEARCH. Use these parameters:
"a" scope="topic" topic="a*"
Details in
VarSEARCH.
--
Peter Thoeny - 2013-05-24
Corollary question:
How to display a list of topics where the Topic name is for example (note use of wild cards ????-??-??-*?
--
TWiki Guest - 2016-08-01
That's still rather easy: a
SEARCH with the following parameters:
".4-.2-.2-.*" type=regex - see
VarSEARCH and
RegularExpression for examples. The regular expression is the perl style, not the shell-style, though:
"." is any character,
"-?" is an optional minus sign and
"-*" are zero or more minus signs. Still, the examples on
RegularExpression should get you going.
--
Harald Jörg - 2016-08-02
A modified regular expression that find the indicated pattern:
".{4}-.{2}-.{2}-.*"
--
Peter Thoeny - 2016-08-03
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.