5fedf330d5c1ba9155a8e143d9a4260f7a595d9d
[jalview.git] / help / html / features / search.html
1 <html>\r
2 <head><title>Search</title>\r
3 <style type="text/css">\r
4 <!--\r
5 td {\r
6         text-align: center;\r
7 }\r
8 -->\r
9 </style>\r
10 </head>\r
11 \r
12 <body>\r
13 <p><strong>Search</strong></p>\r
14 <p>The search box is displayed by pressing Control and F or\r
15   selecting &quot;Find...&quot; from the &quot;Search&quot; menu.</p>\r
16 <img src="search.gif">\r
17 <p>&quot;Find next&quot; will find the next occurence of the specified\r
18   and adjust the alignment window view to show it, and &quot;Find\r
19   all&quot; highlights all matches for a pattern. The &quot;Create new\r
20   group&quot; is a quick way to highlight and group residues matching\r
21   the specified search pattern throughout the alignment.</p> \r
22 <ul>\r
23 <li>The search uses regular expressions. (understands a mixture of\r
24   posix and perl style regex - see below for a summary)</li>\r
25 <li>Gaps are ignored when matching the query to the sequences in the\r
26   alignment.</li>\r
27 <li>The search is applied to both sequences and their IDs but the &quot;Find next&quot;\r
28   and &quot;Find all&quot; buttons only count the sequence matches.</li>\r
29   <li>If a region is selected, then search will <strong>only</strong>\r
30   be performed on that region. </li>\r
31   <li>To quickly clear the current selection, press the &quot;Escape&quot; key.</li>\r
32 </ul>\r
33 <p><strong>A quick Regular Expression Guide</strong></p>\r
34 <p>A regular expression is not just a simple text query - although it\r
35 can be used like one, the query is not parsed literally, but\r
36 interpreted like a series of instructions defining the features of the\r
37 match. For example, a simple query like &quot;ACDED&quot; would\r
38 match all occurences of that string, but &quot;ACD+ED&quot; matches\r
39 both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query\r
40 &quot;[ILGVMA]{;5,}&quot; would find stretches of small,\r
41 hydrophobic amino acids of at least five residues in length.\r
42 </p>\r
43 <p> The table\r
44 below describes some of the regular expression syntax:<br></p>\r
45 <table width="100%" border="1">\r
46   <tr>\r
47     <td width="24%">Regular Expression Element</td>\r
48     <td width="76%">Effect</td>\r
49   </tr>\r
50   <tr>\r
51     <td width="24%">.</td>\r
52     <td width="76%">Matches any single character</td>\r
53   </tr>\r
54   <tr>\r
55     <td>[]</td>\r
56     <td>Matches any one of the characters in the brackets</td>\r
57   </tr>\r
58   <tr>\r
59     <td>^</td>\r
60     <td>Matches at the start of an ID or sequence</td>\r
61   </tr>\r
62   <tr>\r
63     <td>$</td>\r
64     <td>Matches at the end of an ID or sequence</td>\r
65   </tr>\r
66   <tr>\r
67     <td>*</td>\r
68     <td>Matches if the preceding element matches zero or more times</td>\r
69   </tr>\r
70   <tr>\r
71     <td>?</td>\r
72     <td>Matches if the preceding element matched once or not at all</td>\r
73   </tr>\r
74   <tr>\r
75     <td>+</td>\r
76     <td>Matches if the preceding element matched at least once</td>\r
77   </tr>\r
78   <tr>\r
79     <td>{count}</td>\r
80     <td>Matches if the preceding element matches a specified number of\r
81     times\r
82     </td>\r
83   </tr>\r
84   <tr>\r
85     <td>{min,}</td>\r
86     <td> Matches at least the specified number of the preceding element.</td>\r
87   </tr>\r
88   <tr>\r
89     <td>{min,max} </td>\r
90     <td>Matches if the preceding element matches between min and max\r
91     number of times.</td>\r
92   </tr>\r
93 </table>\r
94 </body>\r
95 </html>\r