Question
Hi, i have a Problem in search. I want to search character string exactly like this, with spaces, quotation mark...
title="First Line Manager" value="Lisa"
I wrote search like this:
%SEARCH{ " title="First Line Manager" value="Lisa" " nosearch="on" nosummary="on" regex="on" order="modified" web="Sandbox" topic="*Report"}%
But I can not get correctly result

.
I also wrote as these formats, but they don't work too:(
%SEARCH{ " title=\"First Line Manager\" value=\"Lisa\" " nosearch="on" nosummary="on" regex="on" order="modified" web="Sandbox" topic="*Report"}%
%SEARCH{ " title=\"First Line Manager\" value=\"Lisa\" " nosearch="on" nosummary="on" regex="on" order="modified" web="Sandbox" topic="*Report"}%
%SEARCH{ "title=\"First Line Manager\" value=\"Lisa\"" nosearch="on" nosummary="on" regex="on" order="modified" web="Sandbox" topic="*Report"}%
I can see the character string
title="First Line Manager" value="Lisa" in back end, in all *Report.txt(I know search method is search value from what we can see from back end ".txt" files)
How can i do that? Appreciated very much...
Environment
--
ShashaLuan - 14 Jul 2006
Answer
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.
Unfortunately quoting and escaping quotes in TWiki has always looked somewhat voodoo for me - but I know two workarounds. The first is do a regex search and replace the offending quote by a dot:
%SEARCH{ " title=.First Line Manager. value=.Lisa. " regex="on" }%
Let's do the search right now:
Searched: title=.First Line Manager. value=.Lisa.
Question Hi, i have a Problem in search. I want to search character string exactly like this, with spaces, quotation mark... title `First Line Manager` value `Lisa...
Number of topics: 1
You may, per accident, find a topic containing the string
title=1First Line Manager2 value=3Lisa4 - but I'd guess such strings are not encountered frequently....
Another workaround is to use single quotes
' in your topics. A string like
title='First Line Manager' value='Lisa' should make absolutely no problems in a search.
--
HaraldJoerg - 14 Jul 2006
Thanks very much for your help :), but the character string format "title="First Line Manager" value="Lisa" " is original from the form(raw text of the form), so i cannot change as " "title=.First Line Manager. value=.Lisa. " " or "title=1First Line Manager2 value=3Lisa4"
--
ShashaLuan - 15 Jul 2006
You need to do a regex search as pointed out by Harald. I usually search this to catch just the meta data:
"META:FIELD.*First Line Manager.*value.Lisa"=. To access the form field value in a
FormattedSearch you can simply do a
$formfield(First Line Manager) in your
format parameter of SEARCH.
--
PeterThoeny - 15 Jul 2006
thanks very much, it works:)
--
ShashaLuan - 15 Jul 2006