SID-00362: Can't use a backreference in a SEARCH using >1 form field?
| Status: |
Unanswered |
TWiki version: |
pre-4 |
Perl version: |
5.8.7 |
| Category: |
CategorySearch |
Server OS: |
Ubuntu Server, Gutsy Gibbon |
Last update: |
16 years ago |
I have been trying for some time to get a search to work with multiple form fields
AND a backreference; e.g.:
%SEARCH{ "!Key Date Class(.).*?=\"None\".*Key Date \1.*?=\"\"" scope="all" regex="on" nosearch="on" nototal="on" order="modified" reverse="on" format="|
$topic | $formfield(Primary Focal) | $date | $formfield(Key Date Class1) field incomplete |" }$percnt" limit="100" }%
There are several date fields ( Key Date 1, Key Date 2, ...Key Date n) with associated statuses ( Key Date Class1, Key Date Class2, etc) in our topics that I would like to be able to conduct a search on without having to create a search for each individual Date/Class pair. This has the benefit of being less work, but also seems like it would allow the search query to handle an indeterminate number of date sets, allowing for future expansion without having to edit the searches later.
Using a backreference seems ideal, but the %SEARCH% variable does not appear to be able to span newlines in metadata. Test searches have shown that searching topic text with newlines works perfectly, but any attempt to span lines of metadata returns no results. Regex modifiers such as (?s) seem to negate the search's ability to inspect metadata, and /regex/ only seems to work when the double-quotes are removed from the search text, and reduces the search to just the topic with the search.
If anyone could help me fix the %SEARCH% or provide an alternative way of accomplishing the same thing, that would be great.
If this was fixed in a later revision of Twiki; please let me know.
--
ShawnCantu - 2009-06-10
Discussion and Answer
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2009-08-12
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.