Previous: right-angle-command Up: ../info.html Next: space-command
The "S" command searches lines from the current position to the remainder of the file for one or more strings and displays the node text around the first line containing a match. With the "R" command prefix (*Note R: Regular-Expression-Search), the strings can specify complex pattern matches instead of ordinary string matches. The node containing the matching line then becomes the current node. Sometimes you do not know exactly what you are looking for, but can tell from context. In that case, you can save screen display by using the "K" (keyword) command instead (*Note Keyword: Keyword-Command), because it does not change the display position in the INFO file, but just types out matching lines. You can then issue a more precise "S" command to find the desired line. The search direction can be specified by the "<" and ">" commands (*Note <: Left-Angle-Command, *Note >: Right-Angle-Command), but if it has never been set, it defaults to forwards through the file. String matching is performed on each line separately, so matches cannot span line boundaries. For ordinary string searches, letter case is IGNORED in the search, but for regular expression pattern searches, letter case is significant. The search strings follow the "S" command, and if more than one is specified, they must be separated by vertical bars. Thus "Sone|two|three" will find the first line containing at least one of the strings "one", "two", or "three". If you need to search for a vertical bar, it can be "escaped" (turned into an ordinary character) by prefixing it with an at-sign, "@". Thus, "Sone@|two|three" would search for the strings "one|two" and "three". To get a literal at-sign into the search string, you simply escape it: "Sone@@two" searches for the string "one@two".