Question
How can I use some special chars line % and " within a search?
In my case I want to set up a search for the string:
%INCLUDE{"OutdatedPage"}%
this way:
%SEARCH{search="???" regex="on" scope="text" nosummary="on" nosearch="on" noheader="on" nototal="on"}%
Environment
--
MichaelSzodorai - 08 Jul 2005
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.
Write:
%SEARCH{search="[%]INCLUDE{\"OutdatedPage\"}[%]" regex="on" scope="text" nosummary="on" nosearch="on" noheader="on" nototal="on"}%
To get this:
The square bracket with one char is like a no operation in regex, used to escape the INCLUDE action. Escape the quotes with backslash.
--
PeterThoeny - 01 Sep 2005
Has worked for me using
\\ for backslash:
%SEARCH{search="[%]INCLUDE{\\"OutdatedPage\\"}[%]" regex="on" scope="text" nosummary="on" nosearch="on" noheader="on" nototal="on"}%
Thanks.
--
MichaelSzodorai- 02 Sep 2005