| 1 | <HTML> |
| 2 | |
| 3 | <HEAD> |
| 4 | <TITLE> |
| 5 | EMBOSS: dreg |
| 6 | </TITLE> |
| 7 | </HEAD> |
| 8 | <BODY BGCOLOR="#FFFFFF" text="#000000"> |
| 9 | |
| 10 | <table align=center border=0 cellspacing=0 cellpadding=0> |
| 11 | <tr><td valign=top> |
| 12 | <A HREF="/" ONMOUSEOVER="self.status='Go to the EMBOSS home page';return true"><img border=0 src="/images/emboss_icon.jpg" alt="" width=150 height=48></a> |
| 13 | </td> |
| 14 | <td align=left valign=middle> |
| 15 | <b><font size="+6"> |
| 16 | dreg |
| 17 | </font></b> |
| 18 | </td></tr> |
| 19 | </table> |
| 20 | <br> |
| 21 | <p> |
| 22 | |
| 23 | |
| 24 | <H2> |
| 25 | Wiki |
| 26 | </H2> |
| 27 | |
| 28 | The master copies of EMBOSS documentation are available |
| 29 | at <a href="http://emboss.open-bio.org/wiki/Appdocs"> |
| 30 | http://emboss.open-bio.org/wiki/Appdocs</a> |
| 31 | on the EMBOSS Wiki. |
| 32 | |
| 33 | <p> |
| 34 | Please help by correcting and extending the Wiki pages. |
| 35 | |
| 36 | <H2> |
| 37 | Function |
| 38 | </H2> |
| 39 | Regular expression search of nucleotide sequence(s) |
| 40 | <H2> |
| 41 | Description |
| 42 | </H2> |
| 43 | |
| 44 | <p><b>dreg</b> searches one or more sequences with the supplied |
| 45 | regular expression and writes a report file with the matches.</p> |
| 46 | |
| 47 | <H2> |
| 48 | Usage |
| 49 | </H2> |
| 50 | Here is a sample session with <b>dreg</b> |
| 51 | <p> |
| 52 | |
| 53 | <p> |
| 54 | <table width="90%"><tr><td bgcolor="#CCFFFF"><pre> |
| 55 | |
| 56 | % <b>dreg </b> |
| 57 | Regular expression search of nucleotide sequence(s) |
| 58 | Input nucleotide sequence(s): <b>tembl:x13776</b> |
| 59 | Regular expression pattern: <b>ggtacc</b> |
| 60 | Output report [x13776.dreg]: <b></b> |
| 61 | |
| 62 | </pre></td></tr></table><p> |
| 63 | <p> |
| 64 | <a href="#input.1">Go to the input files for this example</a><br><a href="#output.1">Go to the output files for this example</a><p><p> |
| 65 | |
| 66 | <H2> |
| 67 | Command line arguments |
| 68 | </H2> |
| 69 | <table CELLSPACING=0 CELLPADDING=3 BGCOLOR="#f5f5ff" ><tr><td> |
| 70 | <pre> |
| 71 | Regular expression search of nucleotide sequence(s) |
| 72 | Version: EMBOSS:6.6.0.0 |
| 73 | |
| 74 | Standard (Mandatory) qualifiers: |
| 75 | [-sequence] seqall Nucleotide sequence(s) filename and optional |
| 76 | format, or reference (input USA) |
| 77 | [-pattern] regexp Any regular expression pattern is accepted) |
| 78 | [-outfile] report [*.dreg] Output report file name (default |
| 79 | -rformat seqtable) |
| 80 | |
| 81 | Additional (Optional) qualifiers: (none) |
| 82 | Advanced (Unprompted) qualifiers: (none) |
| 83 | Associated qualifiers: |
| 84 | |
| 85 | "-sequence" associated qualifiers |
| 86 | -sbegin1 integer Start of each sequence to be used |
| 87 | -send1 integer End of each sequence to be used |
| 88 | -sreverse1 boolean Reverse (if DNA) |
| 89 | -sask1 boolean Ask for begin/end/reverse |
| 90 | -snucleotide1 boolean Sequence is nucleotide |
| 91 | -sprotein1 boolean Sequence is protein |
| 92 | -slower1 boolean Make lower case |
| 93 | -supper1 boolean Make upper case |
| 94 | -scircular1 boolean Sequence is circular |
| 95 | -squick1 boolean Read id and sequence only |
| 96 | -sformat1 string Input sequence format |
| 97 | -iquery1 string Input query fields or ID list |
| 98 | -ioffset1 integer Input start position offset |
| 99 | -sdbname1 string Database name |
| 100 | -sid1 string Entryname |
| 101 | -ufo1 string UFO features |
| 102 | -fformat1 string Features format |
| 103 | -fopenfile1 string Features file name |
| 104 | |
| 105 | "-pattern" associated qualifiers |
| 106 | -pformat2 string File format |
| 107 | -pname2 string Pattern base name |
| 108 | |
| 109 | "-outfile" associated qualifiers |
| 110 | -rformat3 string Report format |
| 111 | -rname3 string Base file name |
| 112 | -rextension3 string File name extension |
| 113 | -rdirectory3 string Output directory |
| 114 | -raccshow3 boolean Show accession number in the report |
| 115 | -rdesshow3 boolean Show description in the report |
| 116 | -rscoreshow3 boolean Show the score in the report |
| 117 | -rstrandshow3 boolean Show the nucleotide strand in the report |
| 118 | -rusashow3 boolean Show the full USA in the report |
| 119 | -rmaxall3 integer Maximum total hits to report |
| 120 | -rmaxseq3 integer Maximum hits to report for one sequence |
| 121 | |
| 122 | General qualifiers: |
| 123 | -auto boolean Turn off prompts |
| 124 | -stdout boolean Write first file to standard output |
| 125 | -filter boolean Read first file from standard input, write |
| 126 | first file to standard output |
| 127 | -options boolean Prompt for standard and additional values |
| 128 | -debug boolean Write debug output to program.dbg |
| 129 | -verbose boolean Report some/full command line options |
| 130 | -help boolean Report command line options and exit. More |
| 131 | information on associated and general |
| 132 | qualifiers can be found with -help -verbose |
| 133 | -warning boolean Report warnings |
| 134 | -error boolean Report errors |
| 135 | -fatal boolean Report fatal errors |
| 136 | -die boolean Report dying program messages |
| 137 | -version boolean Report version number and exit |
| 138 | |
| 139 | </pre> |
| 140 | </td></tr></table> |
| 141 | <P> |
| 142 | <table border cellspacing=0 cellpadding=3 bgcolor="#ccccff"> |
| 143 | <tr bgcolor="#FFFFCC"> |
| 144 | <th align="left">Qualifier</th> |
| 145 | <th align="left">Type</th> |
| 146 | <th align="left">Description</th> |
| 147 | <th align="left">Allowed values</th> |
| 148 | <th align="left">Default</th> |
| 149 | </tr> |
| 150 | |
| 151 | <tr bgcolor="#FFFFCC"> |
| 152 | <th align="left" colspan=5>Standard (Mandatory) qualifiers</th> |
| 153 | </tr> |
| 154 | |
| 155 | <tr bgcolor="#FFFFCC"> |
| 156 | <td>[-sequence]<br>(Parameter 1)</td> |
| 157 | <td>seqall</td> |
| 158 | <td>Nucleotide sequence(s) filename and optional format, or reference (input USA)</td> |
| 159 | <td>Readable sequence(s)</td> |
| 160 | <td><b>Required</b></td> |
| 161 | </tr> |
| 162 | |
| 163 | <tr bgcolor="#FFFFCC"> |
| 164 | <td>[-pattern]<br>(Parameter 2)</td> |
| 165 | <td>regexp</td> |
| 166 | <td>Regular expression pattern</td> |
| 167 | <td>Any regular expression pattern is accepted</td> |
| 168 | <td><b>Required</b></td> |
| 169 | </tr> |
| 170 | |
| 171 | <tr bgcolor="#FFFFCC"> |
| 172 | <td>[-outfile]<br>(Parameter 3)</td> |
| 173 | <td>report</td> |
| 174 | <td>Output report file name</td> |
| 175 | <td>(default -rformat seqtable)</td> |
| 176 | <td><i><*></i>.dreg</td> |
| 177 | </tr> |
| 178 | |
| 179 | <tr bgcolor="#FFFFCC"> |
| 180 | <th align="left" colspan=5>Additional (Optional) qualifiers</th> |
| 181 | </tr> |
| 182 | |
| 183 | <tr> |
| 184 | <td colspan=5>(none)</td> |
| 185 | </tr> |
| 186 | |
| 187 | <tr bgcolor="#FFFFCC"> |
| 188 | <th align="left" colspan=5>Advanced (Unprompted) qualifiers</th> |
| 189 | </tr> |
| 190 | |
| 191 | <tr> |
| 192 | <td colspan=5>(none)</td> |
| 193 | </tr> |
| 194 | |
| 195 | <tr bgcolor="#FFFFCC"> |
| 196 | <th align="left" colspan=5>Associated qualifiers</th> |
| 197 | </tr> |
| 198 | |
| 199 | <tr bgcolor="#FFFFCC"> |
| 200 | <td align="left" colspan=5>"-sequence" associated seqall qualifiers |
| 201 | </td> |
| 202 | </tr> |
| 203 | |
| 204 | <tr bgcolor="#FFFFCC"> |
| 205 | <td> -sbegin1<br>-sbegin_sequence</td> |
| 206 | <td>integer</td> |
| 207 | <td>Start of each sequence to be used</td> |
| 208 | <td>Any integer value</td> |
| 209 | <td>0</td> |
| 210 | </tr> |
| 211 | |
| 212 | <tr bgcolor="#FFFFCC"> |
| 213 | <td> -send1<br>-send_sequence</td> |
| 214 | <td>integer</td> |
| 215 | <td>End of each sequence to be used</td> |
| 216 | <td>Any integer value</td> |
| 217 | <td>0</td> |
| 218 | </tr> |
| 219 | |
| 220 | <tr bgcolor="#FFFFCC"> |
| 221 | <td> -sreverse1<br>-sreverse_sequence</td> |
| 222 | <td>boolean</td> |
| 223 | <td>Reverse (if DNA)</td> |
| 224 | <td>Boolean value Yes/No</td> |
| 225 | <td>N</td> |
| 226 | </tr> |
| 227 | |
| 228 | <tr bgcolor="#FFFFCC"> |
| 229 | <td> -sask1<br>-sask_sequence</td> |
| 230 | <td>boolean</td> |
| 231 | <td>Ask for begin/end/reverse</td> |
| 232 | <td>Boolean value Yes/No</td> |
| 233 | <td>N</td> |
| 234 | </tr> |
| 235 | |
| 236 | <tr bgcolor="#FFFFCC"> |
| 237 | <td> -snucleotide1<br>-snucleotide_sequence</td> |
| 238 | <td>boolean</td> |
| 239 | <td>Sequence is nucleotide</td> |
| 240 | <td>Boolean value Yes/No</td> |
| 241 | <td>N</td> |
| 242 | </tr> |
| 243 | |
| 244 | <tr bgcolor="#FFFFCC"> |
| 245 | <td> -sprotein1<br>-sprotein_sequence</td> |
| 246 | <td>boolean</td> |
| 247 | <td>Sequence is protein</td> |
| 248 | <td>Boolean value Yes/No</td> |
| 249 | <td>N</td> |
| 250 | </tr> |
| 251 | |
| 252 | <tr bgcolor="#FFFFCC"> |
| 253 | <td> -slower1<br>-slower_sequence</td> |
| 254 | <td>boolean</td> |
| 255 | <td>Make lower case</td> |
| 256 | <td>Boolean value Yes/No</td> |
| 257 | <td>N</td> |
| 258 | </tr> |
| 259 | |
| 260 | <tr bgcolor="#FFFFCC"> |
| 261 | <td> -supper1<br>-supper_sequence</td> |
| 262 | <td>boolean</td> |
| 263 | <td>Make upper case</td> |
| 264 | <td>Boolean value Yes/No</td> |
| 265 | <td>N</td> |
| 266 | </tr> |
| 267 | |
| 268 | <tr bgcolor="#FFFFCC"> |
| 269 | <td> -scircular1<br>-scircular_sequence</td> |
| 270 | <td>boolean</td> |
| 271 | <td>Sequence is circular</td> |
| 272 | <td>Boolean value Yes/No</td> |
| 273 | <td>N</td> |
| 274 | </tr> |
| 275 | |
| 276 | <tr bgcolor="#FFFFCC"> |
| 277 | <td> -squick1<br>-squick_sequence</td> |
| 278 | <td>boolean</td> |
| 279 | <td>Read id and sequence only</td> |
| 280 | <td>Boolean value Yes/No</td> |
| 281 | <td>N</td> |
| 282 | </tr> |
| 283 | |
| 284 | <tr bgcolor="#FFFFCC"> |
| 285 | <td> -sformat1<br>-sformat_sequence</td> |
| 286 | <td>string</td> |
| 287 | <td>Input sequence format</td> |
| 288 | <td>Any string</td> |
| 289 | <td> </td> |
| 290 | </tr> |
| 291 | |
| 292 | <tr bgcolor="#FFFFCC"> |
| 293 | <td> -iquery1<br>-iquery_sequence</td> |
| 294 | <td>string</td> |
| 295 | <td>Input query fields or ID list</td> |
| 296 | <td>Any string</td> |
| 297 | <td> </td> |
| 298 | </tr> |
| 299 | |
| 300 | <tr bgcolor="#FFFFCC"> |
| 301 | <td> -ioffset1<br>-ioffset_sequence</td> |
| 302 | <td>integer</td> |
| 303 | <td>Input start position offset</td> |
| 304 | <td>Any integer value</td> |
| 305 | <td>0</td> |
| 306 | </tr> |
| 307 | |
| 308 | <tr bgcolor="#FFFFCC"> |
| 309 | <td> -sdbname1<br>-sdbname_sequence</td> |
| 310 | <td>string</td> |
| 311 | <td>Database name</td> |
| 312 | <td>Any string</td> |
| 313 | <td> </td> |
| 314 | </tr> |
| 315 | |
| 316 | <tr bgcolor="#FFFFCC"> |
| 317 | <td> -sid1<br>-sid_sequence</td> |
| 318 | <td>string</td> |
| 319 | <td>Entryname</td> |
| 320 | <td>Any string</td> |
| 321 | <td> </td> |
| 322 | </tr> |
| 323 | |
| 324 | <tr bgcolor="#FFFFCC"> |
| 325 | <td> -ufo1<br>-ufo_sequence</td> |
| 326 | <td>string</td> |
| 327 | <td>UFO features</td> |
| 328 | <td>Any string</td> |
| 329 | <td> </td> |
| 330 | </tr> |
| 331 | |
| 332 | <tr bgcolor="#FFFFCC"> |
| 333 | <td> -fformat1<br>-fformat_sequence</td> |
| 334 | <td>string</td> |
| 335 | <td>Features format</td> |
| 336 | <td>Any string</td> |
| 337 | <td> </td> |
| 338 | </tr> |
| 339 | |
| 340 | <tr bgcolor="#FFFFCC"> |
| 341 | <td> -fopenfile1<br>-fopenfile_sequence</td> |
| 342 | <td>string</td> |
| 343 | <td>Features file name</td> |
| 344 | <td>Any string</td> |
| 345 | <td> </td> |
| 346 | </tr> |
| 347 | |
| 348 | <tr bgcolor="#FFFFCC"> |
| 349 | <td align="left" colspan=5>"-pattern" associated regexp qualifiers |
| 350 | </td> |
| 351 | </tr> |
| 352 | |
| 353 | <tr bgcolor="#FFFFCC"> |
| 354 | <td> -pformat2<br>-pformat_pattern</td> |
| 355 | <td>string</td> |
| 356 | <td>File format</td> |
| 357 | <td>Any string</td> |
| 358 | <td> </td> |
| 359 | </tr> |
| 360 | |
| 361 | <tr bgcolor="#FFFFCC"> |
| 362 | <td> -pname2<br>-pname_pattern</td> |
| 363 | <td>string</td> |
| 364 | <td>Pattern base name</td> |
| 365 | <td>Any string</td> |
| 366 | <td> </td> |
| 367 | </tr> |
| 368 | |
| 369 | <tr bgcolor="#FFFFCC"> |
| 370 | <td align="left" colspan=5>"-outfile" associated report qualifiers |
| 371 | </td> |
| 372 | </tr> |
| 373 | |
| 374 | <tr bgcolor="#FFFFCC"> |
| 375 | <td> -rformat3<br>-rformat_outfile</td> |
| 376 | <td>string</td> |
| 377 | <td>Report format</td> |
| 378 | <td>Any string</td> |
| 379 | <td>seqtable</td> |
| 380 | </tr> |
| 381 | |
| 382 | <tr bgcolor="#FFFFCC"> |
| 383 | <td> -rname3<br>-rname_outfile</td> |
| 384 | <td>string</td> |
| 385 | <td>Base file name</td> |
| 386 | <td>Any string</td> |
| 387 | <td> </td> |
| 388 | </tr> |
| 389 | |
| 390 | <tr bgcolor="#FFFFCC"> |
| 391 | <td> -rextension3<br>-rextension_outfile</td> |
| 392 | <td>string</td> |
| 393 | <td>File name extension</td> |
| 394 | <td>Any string</td> |
| 395 | <td> </td> |
| 396 | </tr> |
| 397 | |
| 398 | <tr bgcolor="#FFFFCC"> |
| 399 | <td> -rdirectory3<br>-rdirectory_outfile</td> |
| 400 | <td>string</td> |
| 401 | <td>Output directory</td> |
| 402 | <td>Any string</td> |
| 403 | <td> </td> |
| 404 | </tr> |
| 405 | |
| 406 | <tr bgcolor="#FFFFCC"> |
| 407 | <td> -raccshow3<br>-raccshow_outfile</td> |
| 408 | <td>boolean</td> |
| 409 | <td>Show accession number in the report</td> |
| 410 | <td>Boolean value Yes/No</td> |
| 411 | <td>N</td> |
| 412 | </tr> |
| 413 | |
| 414 | <tr bgcolor="#FFFFCC"> |
| 415 | <td> -rdesshow3<br>-rdesshow_outfile</td> |
| 416 | <td>boolean</td> |
| 417 | <td>Show description in the report</td> |
| 418 | <td>Boolean value Yes/No</td> |
| 419 | <td>N</td> |
| 420 | </tr> |
| 421 | |
| 422 | <tr bgcolor="#FFFFCC"> |
| 423 | <td> -rscoreshow3<br>-rscoreshow_outfile</td> |
| 424 | <td>boolean</td> |
| 425 | <td>Show the score in the report</td> |
| 426 | <td>Boolean value Yes/No</td> |
| 427 | <td>Y</td> |
| 428 | </tr> |
| 429 | |
| 430 | <tr bgcolor="#FFFFCC"> |
| 431 | <td> -rstrandshow3<br>-rstrandshow_outfile</td> |
| 432 | <td>boolean</td> |
| 433 | <td>Show the nucleotide strand in the report</td> |
| 434 | <td>Boolean value Yes/No</td> |
| 435 | <td>Y</td> |
| 436 | </tr> |
| 437 | |
| 438 | <tr bgcolor="#FFFFCC"> |
| 439 | <td> -rusashow3<br>-rusashow_outfile</td> |
| 440 | <td>boolean</td> |
| 441 | <td>Show the full USA in the report</td> |
| 442 | <td>Boolean value Yes/No</td> |
| 443 | <td>N</td> |
| 444 | </tr> |
| 445 | |
| 446 | <tr bgcolor="#FFFFCC"> |
| 447 | <td> -rmaxall3<br>-rmaxall_outfile</td> |
| 448 | <td>integer</td> |
| 449 | <td>Maximum total hits to report</td> |
| 450 | <td>Any integer value</td> |
| 451 | <td>0</td> |
| 452 | </tr> |
| 453 | |
| 454 | <tr bgcolor="#FFFFCC"> |
| 455 | <td> -rmaxseq3<br>-rmaxseq_outfile</td> |
| 456 | <td>integer</td> |
| 457 | <td>Maximum hits to report for one sequence</td> |
| 458 | <td>Any integer value</td> |
| 459 | <td>0</td> |
| 460 | </tr> |
| 461 | |
| 462 | <tr bgcolor="#FFFFCC"> |
| 463 | <th align="left" colspan=5>General qualifiers</th> |
| 464 | </tr> |
| 465 | |
| 466 | <tr bgcolor="#FFFFCC"> |
| 467 | <td> -auto</td> |
| 468 | <td>boolean</td> |
| 469 | <td>Turn off prompts</td> |
| 470 | <td>Boolean value Yes/No</td> |
| 471 | <td>N</td> |
| 472 | </tr> |
| 473 | |
| 474 | <tr bgcolor="#FFFFCC"> |
| 475 | <td> -stdout</td> |
| 476 | <td>boolean</td> |
| 477 | <td>Write first file to standard output</td> |
| 478 | <td>Boolean value Yes/No</td> |
| 479 | <td>N</td> |
| 480 | </tr> |
| 481 | |
| 482 | <tr bgcolor="#FFFFCC"> |
| 483 | <td> -filter</td> |
| 484 | <td>boolean</td> |
| 485 | <td>Read first file from standard input, write first file to standard output</td> |
| 486 | <td>Boolean value Yes/No</td> |
| 487 | <td>N</td> |
| 488 | </tr> |
| 489 | |
| 490 | <tr bgcolor="#FFFFCC"> |
| 491 | <td> -options</td> |
| 492 | <td>boolean</td> |
| 493 | <td>Prompt for standard and additional values</td> |
| 494 | <td>Boolean value Yes/No</td> |
| 495 | <td>N</td> |
| 496 | </tr> |
| 497 | |
| 498 | <tr bgcolor="#FFFFCC"> |
| 499 | <td> -debug</td> |
| 500 | <td>boolean</td> |
| 501 | <td>Write debug output to program.dbg</td> |
| 502 | <td>Boolean value Yes/No</td> |
| 503 | <td>N</td> |
| 504 | </tr> |
| 505 | |
| 506 | <tr bgcolor="#FFFFCC"> |
| 507 | <td> -verbose</td> |
| 508 | <td>boolean</td> |
| 509 | <td>Report some/full command line options</td> |
| 510 | <td>Boolean value Yes/No</td> |
| 511 | <td>Y</td> |
| 512 | </tr> |
| 513 | |
| 514 | <tr bgcolor="#FFFFCC"> |
| 515 | <td> -help</td> |
| 516 | <td>boolean</td> |
| 517 | <td>Report command line options and exit. More information on associated and general qualifiers can be found with -help -verbose</td> |
| 518 | <td>Boolean value Yes/No</td> |
| 519 | <td>N</td> |
| 520 | </tr> |
| 521 | |
| 522 | <tr bgcolor="#FFFFCC"> |
| 523 | <td> -warning</td> |
| 524 | <td>boolean</td> |
| 525 | <td>Report warnings</td> |
| 526 | <td>Boolean value Yes/No</td> |
| 527 | <td>Y</td> |
| 528 | </tr> |
| 529 | |
| 530 | <tr bgcolor="#FFFFCC"> |
| 531 | <td> -error</td> |
| 532 | <td>boolean</td> |
| 533 | <td>Report errors</td> |
| 534 | <td>Boolean value Yes/No</td> |
| 535 | <td>Y</td> |
| 536 | </tr> |
| 537 | |
| 538 | <tr bgcolor="#FFFFCC"> |
| 539 | <td> -fatal</td> |
| 540 | <td>boolean</td> |
| 541 | <td>Report fatal errors</td> |
| 542 | <td>Boolean value Yes/No</td> |
| 543 | <td>Y</td> |
| 544 | </tr> |
| 545 | |
| 546 | <tr bgcolor="#FFFFCC"> |
| 547 | <td> -die</td> |
| 548 | <td>boolean</td> |
| 549 | <td>Report dying program messages</td> |
| 550 | <td>Boolean value Yes/No</td> |
| 551 | <td>Y</td> |
| 552 | </tr> |
| 553 | |
| 554 | <tr bgcolor="#FFFFCC"> |
| 555 | <td> -version</td> |
| 556 | <td>boolean</td> |
| 557 | <td>Report version number and exit</td> |
| 558 | <td>Boolean value Yes/No</td> |
| 559 | <td>N</td> |
| 560 | </tr> |
| 561 | |
| 562 | </table> |
| 563 | |
| 564 | <H2> |
| 565 | Input file format |
| 566 | </H2> |
| 567 | Any nucleic sequence. |
| 568 | |
| 569 | <p> |
| 570 | |
| 571 | <a name="input.1"></a> |
| 572 | <h3>Input files for usage example </h3> |
| 573 | |
| 574 | 'tembl:x13776' is a sequence entry in the example nucleic acid database 'tembl' |
| 575 | <p> |
| 576 | <p><h3>Database entry: tembl:x13776</h3> |
| 577 | <table width="90%"><tr><td bgcolor="#FFCCFF"> |
| 578 | <pre> |
| 579 | ID X13776; SV 1; linear; genomic DNA; STD; PRO; 2167 BP. |
| 580 | XX |
| 581 | AC X13776; M43175; |
| 582 | XX |
| 583 | DT 19-APR-1989 (Rel. 19, Created) |
| 584 | DT 14-NOV-2006 (Rel. 89, Last updated, Version 24) |
| 585 | XX |
| 586 | DE Pseudomonas aeruginosa amiC and amiR gene for aliphatic amidase regulation |
| 587 | XX |
| 588 | KW aliphatic amidase regulator; amiC gene; amiR gene. |
| 589 | XX |
| 590 | OS Pseudomonas aeruginosa |
| 591 | OC Bacteria; Proteobacteria; Gammaproteobacteria; Pseudomonadales; |
| 592 | OC Pseudomonadaceae; Pseudomonas. |
| 593 | XX |
| 594 | RN [1] |
| 595 | RP 1167-2167 |
| 596 | RA Rice P.M.; |
| 597 | RT ; |
| 598 | RL Submitted (16-DEC-1988) to the INSDC. |
| 599 | RL Rice P.M., EMBL, Postfach 10-2209, Meyerhofstrasse 1, 6900 Heidelberg, FRG. |
| 600 | XX |
| 601 | RN [2] |
| 602 | RP 1167-2167 |
| 603 | RX DOI; 10.1016/0014-5793(89)80249-2. |
| 604 | RX PUBMED; 2495988. |
| 605 | RA Lowe N., Rice P.M., Drew R.E.; |
| 606 | RT "Nucleotide sequence of the aliphatic amidase regulator gene (amiR) of |
| 607 | RT Pseudomonas aeruginosa"; |
| 608 | RL FEBS Lett. 246(1-2):39-43(1989). |
| 609 | XX |
| 610 | RN [3] |
| 611 | RP 1-1292 |
| 612 | RX PUBMED; 1907262. |
| 613 | RA Wilson S., Drew R.; |
| 614 | RT "Cloning and DNA sequence of amiC, a new gene regulating expression of the |
| 615 | RT Pseudomonas aeruginosa aliphatic amidase, and purification of the amiC |
| 616 | RT product"; |
| 617 | RL J. Bacteriol. 173(16):4914-4921(1991). |
| 618 | XX |
| 619 | RN [4] |
| 620 | RP 1-2167 |
| 621 | RA Rice P.M.; |
| 622 | RT ; |
| 623 | RL Submitted (04-SEP-1991) to the INSDC. |
| 624 | RL Rice P.M., EMBL, Postfach 10-2209, Meyerhofstrasse 1, 6900 Heidelberg, FRG. |
| 625 | XX |
| 626 | DR GOA; Q51417. |
| 627 | DR InterPro; IPR003211; AmiSUreI_transpt. |
| 628 | DR UniProtKB/Swiss-Prot; Q51417; AMIS_PSEAE. |
| 629 | |
| 630 | |
| 631 | <font color=red> [Part of this file has been deleted for brevity]</font> |
| 632 | |
| 633 | FT /note="ClaI fragment deleted in pSW36, constitutive |
| 634 | FT phenotype" |
| 635 | FT misc_feature 1 |
| 636 | FT /note="last base of an XhoI site" |
| 637 | FT misc_feature 648..653 |
| 638 | FT /note="end of 658bp XhoI fragment, deletion in pSW3 causes |
| 639 | FT constitutive expression of amiE" |
| 640 | FT misc_difference 1281 |
| 641 | FT /replace="g" |
| 642 | FT /note="conflict" |
| 643 | FT /citation=[3] |
| 644 | XX |
| 645 | SQ Sequence 2167 BP; 363 A; 712 C; 730 G; 362 T; 0 other; |
| 646 | ggtaccgctg gccgagcatc tgctcgatca ccaccagccg ggcgacggga actgcacgat 60 |
| 647 | ctacctggcg agcctggagc acgagcgggt tcgcttcgta cggcgctgag cgacagtcac 120 |
| 648 | aggagaggaa acggatggga tcgcaccagg agcggccgct gatcggcctg ctgttctccg 180 |
| 649 | aaaccggcgt caccgccgat atcgagcgct cgcacgcgta tggcgcattg ctcgcggtcg 240 |
| 650 | agcaactgaa ccgcgagggc ggcgtcggcg gtcgcccgat cgaaacgctg tcccaggacc 300 |
| 651 | ccggcggcga cccggaccgc tatcggctgt gcgccgagga cttcattcgc aaccgggggg 360 |
| 652 | tacggttcct cgtgggctgc tacatgtcgc acacgcgcaa ggcggtgatg ccggtggtcg 420 |
| 653 | agcgcgccga cgcgctgctc tgctacccga ccccctacga gggcttcgag tattcgccga 480 |
| 654 | acatcgtcta cggcggtccg gcgccgaacc agaacagtgc gccgctggcg gcgtacctga 540 |
| 655 | ttcgccacta cggcgagcgg gtggtgttca tcggctcgga ctacatctat ccgcgggaaa 600 |
| 656 | gcaaccatgt gatgcgccac ctgtatcgcc agcacggcgg cacggtgctc gaggaaatct 660 |
| 657 | acattccgct gtatccctcc gacgacgact tgcagcgcgc cgtcgagcgc atctaccagg 720 |
| 658 | cgcgcgccga cgtggtcttc tccaccgtgg tgggcaccgg caccgccgag ctgtatcgcg 780 |
| 659 | ccatcgcccg tcgctacggc gacggcaggc ggccgccgat cgccagcctg accaccagcg 840 |
| 660 | aggcggaggt ggcgaagatg gagagtgacg tggcagaggg gcaggtggtg gtcgcgcctt 900 |
| 661 | acttctccag catcgatacg cccgccagcc gggccttcgt ccaggcctgc catggtttct 960 |
| 662 | tcccggagaa cgcgaccatc accgcctggg ccgaggcggc ctactggcag accttgttgc 1020 |
| 663 | tcggccgcgc cgcgcaggcc gcaggcaact ggcgggtgga agacgtgcag cggcacctgt 1080 |
| 664 | acgacatcga catcgacgcg ccacaggggc cggtccgggt ggagcgccag aacaaccaca 1140 |
| 665 | gccgcctgtc ttcgcgcatc gcggaaatcg atgcgcgcgg cgtgttccag gtccgctggc 1200 |
| 666 | agtcgcccga accgattcgc cccgaccctt atgtcgtcgt gcataacctc gacgactggt 1260 |
| 667 | ccgccagcat gggcggggga ccgctcccat gagcgccaac tcgctgctcg gcagcctgcg 1320 |
| 668 | cgagttgcag gtgctggtcc tcaacccgcc gggggaggtc agcgacgccc tggtcttgca 1380 |
| 669 | gctgatccgc atcggttgtt cggtgcgcca gtgctggccg ccgccggaag ccttcgacgt 1440 |
| 670 | gccggtggac gtggtcttca ccagcatttt ccagaatggc caccacgacg agatcgctgc 1500 |
| 671 | gctgctcgcc gccgggactc cgcgcactac cctggtggcg ctggtggagt acgaaagccc 1560 |
| 672 | cgcggtgctc tcgcagatca tcgagctgga gtgccacggc gtgatcaccc agccgctcga 1620 |
| 673 | tgcccaccgg gtgctgcctg tgctggtatc ggcgcggcgc atcagcgagg aaatggcgaa 1680 |
| 674 | gctgaagcag aagaccgagc agctccagga ccgcatcgcc ggccaggccc ggatcaacca 1740 |
| 675 | ggccaaggtg ttgctgatgc agcgccatgg ctgggacgag cgcgaggcgc accagcacct 1800 |
| 676 | gtcgcgggaa gcgatgaagc ggcgcgagcc gatcctgaag atcgctcagg agttgctggg 1860 |
| 677 | aaacgagccg tccgcctgag cgatccgggc cgaccagaac aataacaaga ggggtatcgt 1920 |
| 678 | catcatgctg ggactggttc tgctgtacgt tggcgcggtg ctgtttctca atgccgtctg 1980 |
| 679 | gttgctgggc aagatcagcg gtcgggaggt ggcggtgatc aacttcctgg tcggcgtgct 2040 |
| 680 | gagcgcctgc gtcgcgttct acctgatctt ttccgcagca gccgggcagg gctcgctgaa 2100 |
| 681 | ggccggagcg ctgaccctgc tattcgcttt tacctatctg tgggtggccg ccaaccagtt 2160 |
| 682 | cctcgag 2167 |
| 683 | // |
| 684 | </pre> |
| 685 | </td></tr></table><p> |
| 686 | |
| 687 | |
| 688 | <H2> |
| 689 | Output file format |
| 690 | </H2> |
| 691 | |
| 692 | <p> |
| 693 | |
| 694 | The output is a standard EMBOSS report file. |
| 695 | |
| 696 | <p> |
| 697 | |
| 698 | The results can be output in one of several styles by using the |
| 699 | command-line qualifier <tt>-rformat xxx</tt>, where 'xxx' is replaced |
| 700 | by the name of the required format. The available format names are: |
| 701 | embl, genbank, gff, pir, swiss, dasgff, debug, listfile, dbmotif, |
| 702 | diffseq, draw, restrict, excel, feattable, motif, nametable, regions, |
| 703 | seqtable, simple, srs, table, tagseq. |
| 704 | |
| 705 | <p> |
| 706 | |
| 707 | See: |
| 708 | <A href="http://emboss.sf.net/docs/themes/ReportFormats.html"> |
| 709 | http://emboss.sf.net/docs/themes/ReportFormats.html</A> |
| 710 | for further information on report formats. |
| 711 | |
| 712 | <p> |
| 713 | |
| 714 | By default <b>dreg</b> writes a 'seqtable' report file. |
| 715 | |
| 716 | <p> |
| 717 | |
| 718 | <a name="output.1"></a> |
| 719 | <h3>Output files for usage example </h3> |
| 720 | <p><h3>File: x13776.dreg</h3> |
| 721 | <table width="90%"><tr><td bgcolor="#CCFFCC"> |
| 722 | <pre> |
| 723 | ######################################## |
| 724 | # Program: dreg |
| 725 | # Rundate: Mon 15 Jul 2013 12:00:00 |
| 726 | # Commandline: dreg |
| 727 | # -sequence tembl:x13776 |
| 728 | # -pattern ggtacc |
| 729 | # Report_format: seqtable |
| 730 | # Report_file: x13776.dreg |
| 731 | ######################################## |
| 732 | |
| 733 | #======================================= |
| 734 | # |
| 735 | # Sequence: X13776 from: 1 to: 2167 |
| 736 | # HitCount: 1 |
| 737 | # |
| 738 | # Pattern: ggtacc |
| 739 | # |
| 740 | #======================================= |
| 741 | |
| 742 | Start End Strand Pattern Sequence |
| 743 | 1 6 + regex:GGTACC ggtacc |
| 744 | |
| 745 | #--------------------------------------- |
| 746 | #--------------------------------------- |
| 747 | |
| 748 | #--------------------------------------- |
| 749 | # Total_sequences: 1 |
| 750 | # Total_length: 2167 |
| 751 | # Reported_sequences: 1 |
| 752 | # Reported_hitcount: 1 |
| 753 | #--------------------------------------- |
| 754 | </pre> |
| 755 | </td></tr></table><p> |
| 756 | |
| 757 | <H2> |
| 758 | Data files |
| 759 | </H2> |
| 760 | |
| 761 | None. |
| 762 | |
| 763 | <H2> |
| 764 | Notes |
| 765 | </H2> |
| 766 | |
| 767 | <p> |
| 768 | A regular expression is a way of specifying an ambiguous pattern to |
| 769 | search for. Regular expressions are commonly used in some computer |
| 770 | programming languages and may be more familiar to some users than to |
| 771 | others. |
| 772 | |
| 773 | <p> |
| 774 | The following is a short guide to regular expressions in EMBOSS: |
| 775 | |
| 776 | |
| 777 | <dl> |
| 778 | <dt>^</dt><dd> |
| 779 | use this at the start of a pattern to insist that the pattern can only |
| 780 | match at the start of a sequence. (eg. '^AUG' matches a start codon at |
| 781 | the start of the sequence) |
| 782 | |
| 783 | |
| 784 | <dt>$</dt><dd> |
| 785 | use this at the end of a pattern to insist that the pattern can only |
| 786 | match at the end of a sequence (eg. 'A+$' matches a poly-A sequence at |
| 787 | the end of the sequence) |
| 788 | |
| 789 | <dt>()</dt><dd> |
| 790 | groups a pattern. This is commonly used with '|' (eg. '(AUG)|(ATG)' |
| 791 | matches either the DNA or RNA form of the initiation codon ) |
| 792 | |
| 793 | <dt>|</dt><dd> |
| 794 | This is the OR operator to enable a match to be made to either one |
| 795 | pattern OR another. There is no AND operator in this version of regular |
| 796 | expressions. |
| 797 | </dl> |
| 798 | |
| 799 | <p> |
| 800 | |
| 801 | The following quantifier characters specify the number of time that |
| 802 | the character before (in this case 'x') matches: |
| 803 | |
| 804 | <dl> |
| 805 | <dt>x?</dt><dd> |
| 806 | matches 0 or 1 times (ie, '' or 'x') |
| 807 | <dt>x*</dt><dd> |
| 808 | matches 0 or more times (ie, '' or 'x' or 'xx' or 'xxx', etc) |
| 809 | <dt>x+</dt><dd> |
| 810 | matches 1 or more times (ie, 'x' or 'xx' or 'xxx', etc) |
| 811 | |
| 812 | <p> |
| 813 | |
| 814 | <dt>{min,max}</dt><dd> |
| 815 | Braces can enclose the specification of the minimum and maximum number |
| 816 | of matches. A match of 'x' of between 3 and 6 times is: 'x{3,6}' |
| 817 | |
| 818 | </dl> |
| 819 | |
| 820 | <p> |
| 821 | Quantifiers can follow any of the following types of character specification: |
| 822 | |
| 823 | <dl> |
| 824 | <dt>x</dt><dd> |
| 825 | any character (ie 'A') |
| 826 | |
| 827 | <dt>\x</dt><dd> |
| 828 | the character after the backslash is used instead of its normal |
| 829 | regular expression meaning. This is commonly used to turn off the |
| 830 | special meaning of the characters '^$()|?*+[]-.'. It may be especially |
| 831 | useful when searching for gap characters in a sequence (eg '\.' matches |
| 832 | only a dot character '.') |
| 833 | |
| 834 | <dt>[xy]</dt><dd> |
| 835 | match one of the characters 'x' or 'y'. You may have one or more |
| 836 | characters in this set. |
| 837 | |
| 838 | <dt>[x-z]</dt><dd> |
| 839 | match any one of the set of characters starting with 'x' and |
| 840 | ending in 'y' in ASCII order (eg '[A-G]' matches any one of: 'A', 'B', |
| 841 | 'C', 'D', 'E', 'F', 'G') |
| 842 | |
| 843 | <dt>[^x-z]</dt><dd> |
| 844 | matches anything except any one of the group of characters in |
| 845 | ASCII order (eg '[^A-G]' matches anything EXCEPT any one of: 'A', 'B', |
| 846 | 'C', 'D', 'E', 'F', 'G') |
| 847 | |
| 848 | <dt>.</dt><dd> |
| 849 | the dot character matches any other character (eg: 'A.G' matches |
| 850 | 'AAG', 'AaG', 'AZG', 'A-G' 'A G', etc.) |
| 851 | </dl> |
| 852 | |
| 853 | Combining some of these features gives the example: |
| 854 | |
| 855 | <pre> |
| 856 | '([AGC]+GGG)|(TTTGGG)' |
| 857 | </pre> |
| 858 | |
| 859 | which matches one or more of any one of 'A' or |
| 860 | 'G' or 'C' followed by three 'G's or it matches just 'TTTGGG'. |
| 861 | |
| 862 | <p> |
| 863 | Regular expressions are case-sensitive. |
| 864 | The pattern 'AAAA' will not match the sequence 'aaaa'. |
| 865 | |
| 866 | For this reason, both your pattern and the input sequences are |
| 867 | converted to upper-case. |
| 868 | |
| 869 | |
| 870 | <H2>The syntax in detail</H2> |
| 871 | |
| 872 | |
| 873 | EMBOSS uses the publicly available PCRE code library to do regular |
| 874 | expressions. |
| 875 | |
| 876 | <p> |
| 877 | |
| 878 | The full documentation of the PCRE system can be seen at |
| 879 | <a href="http://www.pcre.org/pcre.txt">http://www.pcre.org/pcre.txt</a> |
| 880 | |
| 881 | <p> |
| 882 | |
| 883 | A condensed description of the syntax of PCRE follows, without features |
| 884 | that are thought not to be required for searching for patterns in |
| 885 | sequences (e.g. matching non-printing characters, atomic grouping, |
| 886 | back-references, assertion, conditional sub-patterns, recursive |
| 887 | patterns, subpatterns as subroutines, callouts). If you do neot see a |
| 888 | required function described below, please see the full description on |
| 889 | the <a href="http://www.pcre.org/pcre.txt">PCRE web site</a>. |
| 890 | |
| 891 | <p> |
| 892 | |
| 893 | <H3>PCRE REGULAR EXPRESSION DETAILS</H3> |
| 894 | |
| 895 | The syntax and semantics of the regular expressions supported by PCRE are described below. Regular expressions are |
| 896 | also described in the Perl documentation and in a number of |
| 897 | other books, some of which have copious examples. Jeffrey |
| 898 | Friedl's "Mastering Regular Expressions", published by |
| 899 | O'Reilly, covers them in great detail. The description here |
| 900 | is intended as reference documentation. |
| 901 | |
| 902 | <p> |
| 903 | |
| 904 | |
| 905 | A regular expression is a pattern that is matched against a |
| 906 | subject string from left to right. Most characters stand for |
| 907 | themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern |
| 908 | |
| 909 | <p> |
| 910 | |
| 911 | |
| 912 | The quick brown fox |
| 913 | <p> |
| 914 | |
| 915 | matches a portion of a subject string that is identical to |
| 916 | itself. The power of regular expressions comes from the |
| 917 | ability to include alternatives and repetitions in the pattern. These are encoded in the pattern by the use of meta-characters, which do not stand for themselves but instead |
| 918 | are interpreted in some special way. |
| 919 | |
| 920 | <p> |
| 921 | |
| 922 | There are two different sets of meta-characters: those that |
| 923 | are recognized anywhere in the pattern except within square |
| 924 | brackets, and those that are recognized in square brackets. |
| 925 | Outside square brackets, the meta-characters are as follows: |
| 926 | |
| 927 | <p> |
| 928 | |
| 929 | <pre> |
| 930 | \ general escape character with several uses |
| 931 | ^ assert start of string (or line, in multiline mode) |
| 932 | $ assert end of string (or line, in multiline mode) |
| 933 | . match any character except newline (by default) |
| 934 | [ start character class definition |
| 935 | | start of alternative branch |
| 936 | ( start subpattern |
| 937 | ) end subpattern |
| 938 | ? extends the meaning of ( |
| 939 | also 0 or 1 quantifier |
| 940 | also quantifier minimizer |
| 941 | * 0 or more quantifier |
| 942 | + 1 or more quantifier |
| 943 | also "possessive quantifier" |
| 944 | { start min/max quantifier |
| 945 | |
| 946 | </pre> |
| 947 | |
| 948 | <p> |
| 949 | |
| 950 | Part of a pattern that is in square brackets is called a |
| 951 | "character class". In a character class the only meta-characters are: |
| 952 | |
| 953 | <p> |
| 954 | |
| 955 | <pre> |
| 956 | \ general escape character |
| 957 | ^ negate the class, but only if the first character |
| 958 | - indicates character range |
| 959 | [ POSIX character class (only if followed by POSIX |
| 960 | syntax) |
| 961 | ] terminates the character class |
| 962 | </pre> |
| 963 | |
| 964 | <p> |
| 965 | |
| 966 | The following sections describe the use of each of the |
| 967 | meta-characters. |
| 968 | |
| 969 | |
| 970 | <h4>BACKSLASH</H4> |
| 971 | |
| 972 | The backslash character has several uses. Firstly, if it is |
| 973 | followed by a non-alphameric character, it takes away any |
| 974 | special meaning that character may have. This use of |
| 975 | backslash as an escape character applies both inside and |
| 976 | outside character classes. |
| 977 | |
| 978 | <p> |
| 979 | |
| 980 | For example, if you want to match a * character, you write |
| 981 | \* in the pattern. This escaping action applies whether or |
| 982 | not the following character would otherwise be interpreted |
| 983 | as a meta-character, so it is always safe to precede a nonalphameric with backslash to specify that it stands for |
| 984 | itself. In particular, if you want to match a backslash, you |
| 985 | write \\. |
| 986 | |
| 987 | <p> |
| 988 | |
| 989 | The third use of backslash is for specifying generic character types: |
| 990 | |
| 991 | <p> |
| 992 | |
| 993 | <pre> |
| 994 | \d any decimal digit |
| 995 | \D any character that is not a decimal digit |
| 996 | \s any whitespace character |
| 997 | \S any character that is not a whitespace character |
| 998 | \w any "word" character |
| 999 | W any "non-word" character |
| 1000 | </pre> |
| 1001 | |
| 1002 | <p> |
| 1003 | |
| 1004 | Each pair of escape sequences partitions the complete set of |
| 1005 | characters into two disjoint sets. Any given character |
| 1006 | matches one, and only one, of each pair. |
| 1007 | |
| 1008 | <p> |
| 1009 | |
| 1010 | A "word" character is any letter or digit or the underscore |
| 1011 | character, that is, any character which can be part of a |
| 1012 | Perl "word". The definition of letters and digits is controlled by PCRE's character tables, and may vary if locale- |
| 1013 | specific matching is taking place (see "Locale support" in |
| 1014 | the pcreapi page). For example, in the "fr" (French) locale, |
| 1015 | some character codes greater than 128 are used for accented |
| 1016 | letters, and these are matched by \w. |
| 1017 | |
| 1018 | <p> |
| 1019 | |
| 1020 | These character type sequences can appear both inside and |
| 1021 | outside character classes. They each match one character of |
| 1022 | the appropriate type. If the current matching point is at |
| 1023 | the end of the subject string, all of them fail, since there |
| 1024 | is no character to match. |
| 1025 | |
| 1026 | <p> |
| 1027 | |
| 1028 | The fourth use of backslash is for certain simple assertions. An assertion specifies a condition that has to be met |
| 1029 | at a particular point in a match, without consuming any |
| 1030 | characters from the subject string. The use of subpatterns |
| 1031 | for more complicated assertions is described below. The |
| 1032 | backslashed assertions are |
| 1033 | |
| 1034 | <p> |
| 1035 | |
| 1036 | <pre> |
| 1037 | \b matches at a word boundary |
| 1038 | \B matches when not at a word boundary |
| 1039 | \A matches at start of subject |
| 1040 | \Z matches at end of subject or before newline at end |
| 1041 | \z matches at end of subject |
| 1042 | \G matches at first matching position in subject |
| 1043 | </pre> |
| 1044 | |
| 1045 | <p> |
| 1046 | |
| 1047 | These assertions may not appear in character classes (but |
| 1048 | note that \b has a different meaning, namely the backspace |
| 1049 | character, inside a character class). |
| 1050 | |
| 1051 | <p> |
| 1052 | |
| 1053 | A word boundary is a position in the subject string where |
| 1054 | the current character and the previous character do not both |
| 1055 | match \w or \W (i.e. one matches \w and the other matches |
| 1056 | \W), or the start or end of the string if the first or last |
| 1057 | character matches \w, respectively. |
| 1058 | The \A, \Z, and \z assertions differ from the traditional |
| 1059 | circumflex and dollar (described below) in that they only |
| 1060 | ever match at the very start and end of the subject string, |
| 1061 | whatever options are set. Thus, they are independent of multiline mode. |
| 1062 | |
| 1063 | |
| 1064 | <H4>CIRCUMFLEX AND DOLLAR</H4> |
| 1065 | |
| 1066 | Outside a character class, in the default matching mode, the |
| 1067 | circumflex character is an assertion which is true only if |
| 1068 | the current matching point is at the start of the subject |
| 1069 | string. Inside a character class, circumflex has an |
| 1070 | entirely different meaning (see below). |
| 1071 | |
| 1072 | <p> |
| 1073 | |
| 1074 | Circumflex need not be the first character of the pattern if |
| 1075 | a number of alternatives are involved, but it should be the |
| 1076 | first thing in each alternative in which it appears if the |
| 1077 | pattern is ever to match that branch. If all possible alternatives start with a circumflex, that is, if the pattern is |
| 1078 | constrained to match only at the start of the subject, it is |
| 1079 | said to be an "anchored" pattern. (There are also other constructs that can cause a pattern to be anchored.) |
| 1080 | |
| 1081 | <p> |
| 1082 | |
| 1083 | A dollar character is an assertion which is true only if the |
| 1084 | current matching point is at the end of the subject string, |
| 1085 | or immediately before a newline character that is the last |
| 1086 | character in the string (by default). Dollar need not be the |
| 1087 | last character of the pattern if a number of alternatives |
| 1088 | are involved, but it should be the last item in any branch |
| 1089 | in which it appears. Dollar has no special meaning in a |
| 1090 | character class. |
| 1091 | |
| 1092 | |
| 1093 | <H4>FULL STOP (PERIOD, DOT)</H4> |
| 1094 | |
| 1095 | Outside a character class, a dot in the pattern matches any |
| 1096 | one character in the subject, including a non-printing character, |
| 1097 | but not (by default) newline. The |
| 1098 | handling of dot is entirely independent of the handling of |
| 1099 | circumflex and dollar, the only relationship being that they |
| 1100 | both involve newline characters. Dot has no special meaning |
| 1101 | in a character class. |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | <H4>SQUARE BRACKETS</H4> |
| 1106 | |
| 1107 | An opening square bracket introduces a character class, terminated |
| 1108 | by a closing square bracket. A closing square |
| 1109 | bracket on its own is not special. If a closing square |
| 1110 | bracket is required as a member of the class, it should be |
| 1111 | the first data character in the class (after an initial circumflex, |
| 1112 | if present) or escaped with a backslash. |
| 1113 | |
| 1114 | <p> |
| 1115 | |
| 1116 | A character class matches a single character in the subject. |
| 1117 | A matched character must be in the set of characters defined |
| 1118 | by the class, unless the first character in the class definition is |
| 1119 | a circumflex, in which case the subject character |
| 1120 | must not be in the set defined by the class. If a circumflex |
| 1121 | is actually required as a member of the class, ensure it is |
| 1122 | not the first character, or escape it with a backslash. |
| 1123 | |
| 1124 | <p> |
| 1125 | |
| 1126 | For example, the character class [aeiou] matches any lower |
| 1127 | case vowel, while [^aeiou] matches any character that is not |
| 1128 | a lower case vowel. Note that a circumflex is just a convenient |
| 1129 | notation for specifying the characters which are in |
| 1130 | the class by enumerating those that are not. It is not an |
| 1131 | assertion: it still consumes a character from the subject |
| 1132 | string, and fails if the current pointer is at the end of |
| 1133 | the string. |
| 1134 | |
| 1135 | <p> |
| 1136 | |
| 1137 | When caseless matching is set, any letters in a class |
| 1138 | represent both their upper case and lower case versions, so |
| 1139 | for example, a caseless [aeiou] matches "A" as well as "a", |
| 1140 | and a caseless [^aeiou] does not match "A", whereas a caseful version would. PCRE does not support the concept of case |
| 1141 | for characters with values greater than 255. |
| 1142 | A class such as [^a] will |
| 1143 | always match a newline. |
| 1144 | |
| 1145 | <p> |
| 1146 | |
| 1147 | The minus (hyphen) character can be used to specify a range |
| 1148 | of characters in a character class. For example, [d-m] |
| 1149 | matches any letter between d and m, inclusive. If a minus |
| 1150 | character is required in a class, it must be escaped with a |
| 1151 | backslash or appear in a position where it cannot be interpreted as indicating a range, typically as the first or last |
| 1152 | character in the class. |
| 1153 | |
| 1154 | <p> |
| 1155 | |
| 1156 | It is not possible to have the literal character "]" as the |
| 1157 | end character of a range. A pattern such as [W-]46] is |
| 1158 | interpreted as a class of two characters ("W" and "-") followed by a literal string "46]", so it would match "W46]" or |
| 1159 | "-46]". However, if the "]" is escaped with a backslash it |
| 1160 | is interpreted as the end of range, so [W-\]46] is interpreted as a single class containing a range followed by two |
| 1161 | separate characters. The octal or hexadecimal representation |
| 1162 | of "]" can also be used to end a range. |
| 1163 | |
| 1164 | <p> |
| 1165 | |
| 1166 | The character types \d, \D, \s, \S, \w, and \W may also |
| 1167 | appear in a character class, and add the characters that |
| 1168 | they match to the class. For example, [\dABCDEF] matches any |
| 1169 | hexadecimal digit. A circumflex can conveniently be used |
| 1170 | with the upper case character types to specify a more restricted set of characters than the matching lower case type. |
| 1171 | For example, the class [^\W_] matches any letter or digit, |
| 1172 | but not underscore. |
| 1173 | |
| 1174 | <p> |
| 1175 | |
| 1176 | All non-alphameric characters other than \, -, ^ (at the |
| 1177 | start) and the terminating ] are non-special in character |
| 1178 | classes, but it does no harm if they are escaped. |
| 1179 | |
| 1180 | |
| 1181 | <H4>VERTICAL BAR</H4> |
| 1182 | |
| 1183 | Vertical bar characters are used to separate alternative |
| 1184 | patterns. For example, the pattern |
| 1185 | |
| 1186 | <p> |
| 1187 | |
| 1188 | gilbert|sullivan |
| 1189 | |
| 1190 | <p> |
| 1191 | |
| 1192 | matches either "gilbert" or "sullivan". Any number of alternatives may appear, and an empty alternative is permitted |
| 1193 | (matching the empty string). The matching process tries |
| 1194 | each alternative in turn, from left to right, and the first |
| 1195 | one that succeeds is used. If the alternatives are within a |
| 1196 | subpattern (defined below), "succeeds" means matching the |
| 1197 | rest of the main pattern as well as the alternative in the |
| 1198 | subpattern. |
| 1199 | |
| 1200 | |
| 1201 | <H4>INTERNAL OPTION SETTING</H4> |
| 1202 | |
| 1203 | The settings of the PCRE_CASELESS, PCRE_MULTILINE, |
| 1204 | PCRE_DOTALL, and PCRE_EXTENDED options can be changed from |
| 1205 | within the pattern by a sequence of Perl option letters |
| 1206 | enclosed between "(?" and ")". The option letters are |
| 1207 | |
| 1208 | <p> |
| 1209 | <pre> |
| 1210 | i for PCRE_CASELESS |
| 1211 | m for PCRE_MULTILINE |
| 1212 | s for PCRE_DOTALL |
| 1213 | x for PCRE_EXTENDED |
| 1214 | </pre> |
| 1215 | |
| 1216 | <p> |
| 1217 | |
| 1218 | For example, (?im) sets caseless, multiline matching. It is |
| 1219 | also possible to unset these options by preceding the letter |
| 1220 | with a hyphen, and a combined setting and unsetting such as |
| 1221 | (?im-sx), which sets PCRE_CASELESS and PCRE_MULTILINE while |
| 1222 | unsetting PCRE_DOTALL and PCRE_EXTENDED, is also permitted. |
| 1223 | If a letter appears both before and after the hyphen, the |
| 1224 | option is unset. |
| 1225 | |
| 1226 | <p> |
| 1227 | |
| 1228 | When an option change occurs at top level (that is, not |
| 1229 | inside subpattern parentheses), the change applies to the |
| 1230 | remainder of the pattern that follows. If the change is |
| 1231 | placed right at the start of a pattern, PCRE extracts it |
| 1232 | into the global options (and it will therefore show up in |
| 1233 | data extracted by the pcre_fullinfo() function). |
| 1234 | |
| 1235 | <p> |
| 1236 | |
| 1237 | An option change within a subpattern affects only that part |
| 1238 | of the current pattern that follows it, so |
| 1239 | |
| 1240 | <p> |
| 1241 | |
| 1242 | (a(?i)b)c |
| 1243 | |
| 1244 | <p> |
| 1245 | |
| 1246 | matches abc and aBc and no other strings (assuming |
| 1247 | PCRE_CASELESS is not used). By this means, options can be |
| 1248 | made to have different settings in different parts of the |
| 1249 | pattern. Any changes made in one alternative do carry on |
| 1250 | into subsequent branches within the same subpattern. For |
| 1251 | example, |
| 1252 | |
| 1253 | <p> |
| 1254 | |
| 1255 | (a(?i)b|c) |
| 1256 | |
| 1257 | <p> |
| 1258 | |
| 1259 | matches "ab", "aB", "c", and "C", even though when matching |
| 1260 | "C" the first branch is abandoned before the option setting. |
| 1261 | This is because the effects of option settings happen at |
| 1262 | compile time. There would be some very weird behaviour otherwise. |
| 1263 | |
| 1264 | <p> |
| 1265 | |
| 1266 | The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can |
| 1267 | be changed in the same way as the Perl-compatible options by |
| 1268 | using the characters U and X respectively. The (?X) flag |
| 1269 | setting is special in that it must always occur earlier in |
| 1270 | the pattern than any of the additional features it turns on, |
| 1271 | even when it is at top level. It is best put at the start. |
| 1272 | |
| 1273 | |
| 1274 | <H4>SUBPATTERNS</H4> |
| 1275 | |
| 1276 | Subpatterns are delimited by parentheses (round brackets), |
| 1277 | which can be nested. Marking part of a pattern as a subpattern |
| 1278 | does two things: |
| 1279 | |
| 1280 | <p> |
| 1281 | |
| 1282 | 1. It localizes a set of alternatives. For example, the pattern |
| 1283 | |
| 1284 | <p> |
| 1285 | |
| 1286 | cat(aract|erpillar|) |
| 1287 | <p> |
| 1288 | |
| 1289 | matches one of the words "cat", "cataract", or "caterpillar". Without the parentheses, it would match "cataract", |
| 1290 | "erpillar" or the empty string. |
| 1291 | |
| 1292 | <p> |
| 1293 | |
| 1294 | 2. It sets up the subpattern as a capturing subpattern (as |
| 1295 | defined above). When the whole pattern matches, that portion of the subject string that matched the subpattern is |
| 1296 | passed back to the caller via the ovector argument of |
| 1297 | pcre_exec(). Opening parentheses are counted from left to |
| 1298 | right (starting from 1) to obtain the numbers of the capturing subpatterns. |
| 1299 | |
| 1300 | <p> |
| 1301 | |
| 1302 | For example, if the string "the red king" is matched against |
| 1303 | the pattern |
| 1304 | |
| 1305 | <p> |
| 1306 | |
| 1307 | the ((red|white) (king|queen)) |
| 1308 | |
| 1309 | <p> |
| 1310 | |
| 1311 | the captured substrings are "red king", "red", and "king", |
| 1312 | and are numbered 1, 2, and 3, respectively. |
| 1313 | |
| 1314 | <p> |
| 1315 | |
| 1316 | The fact that plain parentheses fulfil two functions is not |
| 1317 | always helpful. There are often times when a grouping subpattern is required without a capturing requirement. If an |
| 1318 | opening parenthesis is followed by a question mark and a |
| 1319 | colon, the subpattern does not do any capturing, and is not |
| 1320 | counted when computing the number of any subsequent capturing subpatterns. For example, if the string "the white |
| 1321 | queen" is matched against the pattern |
| 1322 | |
| 1323 | <p> |
| 1324 | |
| 1325 | the ((?:red|white) (king|queen)) |
| 1326 | |
| 1327 | <p> |
| 1328 | |
| 1329 | the captured substrings are "white queen" and "queen", and |
| 1330 | are numbered 1 and 2. The maximum number of capturing subpatterns is 65535, and the maximum depth of nesting of all |
| 1331 | subpatterns, both capturing and non-capturing, is 200. |
| 1332 | |
| 1333 | <p> |
| 1334 | |
| 1335 | As a convenient shorthand, if any option settings are |
| 1336 | required at the start of a non-capturing subpattern, the |
| 1337 | option letters may appear between the "?" and the ":". Thus |
| 1338 | the two patterns |
| 1339 | |
| 1340 | <p> |
| 1341 | <pre> |
| 1342 | (?i:saturday|sunday) |
| 1343 | (?:(?i)saturday|sunday) |
| 1344 | </pre> |
| 1345 | |
| 1346 | <p> |
| 1347 | |
| 1348 | match exactly the same set of strings. Because alternative |
| 1349 | branches are tried from left to right, and options are not |
| 1350 | reset until the end of the subpattern is reached, an option |
| 1351 | setting in one branch does affect subsequent branches, so |
| 1352 | the above patterns match "SUNDAY" as well as "Saturday". |
| 1353 | |
| 1354 | |
| 1355 | <H4>REPETITION</H4> |
| 1356 | |
| 1357 | Repetition is specified by quantifiers, which can follow any |
| 1358 | of the following items: |
| 1359 | |
| 1360 | <p> |
| 1361 | |
| 1362 | <pre> |
| 1363 | a literal data character |
| 1364 | the . meta-character |
| 1365 | the \C escape sequence |
| 1366 | escapes such as \d that match single characters |
| 1367 | a character class |
| 1368 | a back reference (see next section) |
| 1369 | a parenthesized subpattern (unless it is an assertion) |
| 1370 | </pre> |
| 1371 | |
| 1372 | <p> |
| 1373 | |
| 1374 | |
| 1375 | The general repetition quantifier specifies a minimum and |
| 1376 | maximum number of permitted matches, by giving the two |
| 1377 | numbers in curly brackets (braces), separated by a comma. |
| 1378 | The numbers must be less than 65536, and the first must be |
| 1379 | less than or equal to the second. For example: |
| 1380 | |
| 1381 | <p> |
| 1382 | |
| 1383 | |
| 1384 | z{2,4} |
| 1385 | |
| 1386 | |
| 1387 | <p> |
| 1388 | |
| 1389 | matches "zz", "zzz", or "zzzz". A closing brace on its own |
| 1390 | is not a special character. If the second number is omitted, |
| 1391 | but the comma is present, there is no upper limit; if the |
| 1392 | second number and the comma are both omitted, the quantifier |
| 1393 | specifies an exact number of required matches. Thus |
| 1394 | |
| 1395 | <p> |
| 1396 | |
| 1397 | |
| 1398 | [aeiou]{3,} |
| 1399 | |
| 1400 | <p> |
| 1401 | |
| 1402 | |
| 1403 | matches at least 3 successive vowels, but may match many |
| 1404 | more, while |
| 1405 | |
| 1406 | <p> |
| 1407 | |
| 1408 | |
| 1409 | \d{8} |
| 1410 | |
| 1411 | |
| 1412 | <p> |
| 1413 | |
| 1414 | matches exactly 8 digits. An opening curly bracket that |
| 1415 | appears in a position where a quantifier is not allowed, or |
| 1416 | one that does not match the syntax of a quantifier, is taken |
| 1417 | as a literal character. For example, {,6} is not a quantifier, but a literal string of four characters. |
| 1418 | |
| 1419 | <p> |
| 1420 | |
| 1421 | |
| 1422 | The quantifier {0} is permitted, causing the expression to |
| 1423 | behave as if the previous item and the quantifier were not |
| 1424 | present. |
| 1425 | |
| 1426 | <p> |
| 1427 | |
| 1428 | |
| 1429 | For convenience (and historical compatibility) the three |
| 1430 | most common quantifiers have single-character abbreviations: |
| 1431 | |
| 1432 | <p> |
| 1433 | |
| 1434 | <pre> |
| 1435 | * is equivalent to {0,} |
| 1436 | + is equivalent to {1,} |
| 1437 | ? is equivalent to {0,1} |
| 1438 | </pre> |
| 1439 | |
| 1440 | <p> |
| 1441 | |
| 1442 | |
| 1443 | It is possible to construct infinite loops by following a |
| 1444 | subpattern that can match no characters with a quantifier |
| 1445 | that has no upper limit, for example: |
| 1446 | |
| 1447 | <p> |
| 1448 | |
| 1449 | |
| 1450 | (a?)* |
| 1451 | |
| 1452 | <p> |
| 1453 | |
| 1454 | |
| 1455 | Earlier versions of Perl and PCRE used to give an error at |
| 1456 | compile time for such patterns. However, because there are |
| 1457 | cases where this can be useful, such patterns are now |
| 1458 | accepted, but if any repetition of the subpattern does in |
| 1459 | fact match no characters, the loop is forcibly broken. |
| 1460 | |
| 1461 | <p> |
| 1462 | |
| 1463 | |
| 1464 | By default, the quantifiers are "greedy", that is, they |
| 1465 | match as much as possible (up to the maximum number of permitted times), without causing the rest of the pattern to |
| 1466 | fail. The classic example of where this gives problems is in |
| 1467 | trying to match comments in C programs. These appear between |
| 1468 | the sequences /* and */ and within the sequence, individual |
| 1469 | * and / characters may appear. An attempt to match C comments by applying the pattern |
| 1470 | |
| 1471 | <p> |
| 1472 | |
| 1473 | |
| 1474 | /\*.*\*/ |
| 1475 | |
| 1476 | <p> |
| 1477 | |
| 1478 | |
| 1479 | to the string |
| 1480 | |
| 1481 | <p> |
| 1482 | |
| 1483 | <pre> |
| 1484 | /* first command */ not comment /* second comment */ |
| 1485 | </pre> |
| 1486 | |
| 1487 | <p> |
| 1488 | |
| 1489 | |
| 1490 | fails, because it matches the entire string owing to the |
| 1491 | greediness of the .* item. |
| 1492 | |
| 1493 | <p> |
| 1494 | |
| 1495 | |
| 1496 | However, if a quantifier is followed by a question mark, it |
| 1497 | ceases to be greedy, and instead matches the minimum number |
| 1498 | of times possible, so the pattern |
| 1499 | |
| 1500 | <p> |
| 1501 | |
| 1502 | |
| 1503 | /\*.*?\*/ |
| 1504 | |
| 1505 | <p> |
| 1506 | |
| 1507 | |
| 1508 | does the right thing with the C comments. The meaning of the |
| 1509 | various quantifiers is not otherwise changed, just the preferred number of matches. Do not confuse this use of question mark with its use as a quantifier in its own right. |
| 1510 | Because it has two uses, it can sometimes appear doubled, as |
| 1511 | in |
| 1512 | |
| 1513 | <p> |
| 1514 | |
| 1515 | |
| 1516 | \d??\d |
| 1517 | |
| 1518 | <p> |
| 1519 | |
| 1520 | |
| 1521 | which matches one digit by preference, but can match two if |
| 1522 | that is the only way the rest of the pattern matches. |
| 1523 | |
| 1524 | <p> |
| 1525 | |
| 1526 | |
| 1527 | If the PCRE_UNGREEDY option is set (an option which is not |
| 1528 | available in Perl), the quantifiers are not greedy by |
| 1529 | default, but individual ones can be made greedy by following |
| 1530 | them with a question mark. In other words, it inverts the |
| 1531 | default behaviour. |
| 1532 | |
| 1533 | <p> |
| 1534 | |
| 1535 | |
| 1536 | When a parenthesized subpattern is quantified with a minimum |
| 1537 | repeat count that is greater than 1 or with a limited maximum, more store is required for the compiled pattern, in |
| 1538 | proportion to the size of the minimum or maximum. |
| 1539 | If a pattern starts with .* or .{0,} and the PCRE_DOTALL |
| 1540 | option (equivalent to Perl's /s) is set, thus allowing the . |
| 1541 | to match newlines, the pattern is implicitly anchored, |
| 1542 | because whatever follows will be tried against every character position in the subject string, so there is no point in |
| 1543 | retrying the overall match at any position after the first. |
| 1544 | PCRE normally treats such a pattern as though it were preceded by \A. |
| 1545 | |
| 1546 | <p> |
| 1547 | |
| 1548 | |
| 1549 | In cases where it is known that the subject string contains |
| 1550 | no newlines, it is worth setting PCRE_DOTALL in order to |
| 1551 | obtain this optimization, or alternatively using ^ to indicate anchoring explicitly. |
| 1552 | |
| 1553 | <p> |
| 1554 | |
| 1555 | |
| 1556 | However, there is one situation where the optimization cannot be used. When .* is inside capturing parentheses that |
| 1557 | are the subject of a backreference elsewhere in the pattern, |
| 1558 | a match at the start may fail, and a later one succeed. Consider, for example: |
| 1559 | |
| 1560 | <p> |
| 1561 | |
| 1562 | |
| 1563 | (.*)abc\1 |
| 1564 | |
| 1565 | <p> |
| 1566 | |
| 1567 | |
| 1568 | If the subject is "xyz123abc123" the match point is the |
| 1569 | fourth character. For this reason, such a pattern is not |
| 1570 | implicitly anchored. |
| 1571 | |
| 1572 | <p> |
| 1573 | |
| 1574 | |
| 1575 | When a capturing subpattern is repeated, the value captured |
| 1576 | is the substring that matched the final iteration. For example, after |
| 1577 | |
| 1578 | <p> |
| 1579 | |
| 1580 | |
| 1581 | (tweedle[dume]{3}\s*)+ |
| 1582 | |
| 1583 | <p> |
| 1584 | |
| 1585 | |
| 1586 | has matched "tweedledum tweedledee" the value of the captured substring is "tweedledee". However, if there are |
| 1587 | nested capturing subpatterns, the corresponding captured |
| 1588 | values may have been set in previous iterations. For example, after |
| 1589 | |
| 1590 | <p> |
| 1591 | |
| 1592 | <pre> |
| 1593 | /(a|(b))+/ |
| 1594 | </pre> |
| 1595 | |
| 1596 | <p> |
| 1597 | |
| 1598 | |
| 1599 | <H3>PCRE PERFORMANCE</H3> |
| 1600 | |
| 1601 | Certain items that may appear in regular expression patterns |
| 1602 | are more efficient than others. It is more efficient to use |
| 1603 | a character class like [aeiou] than a set of alternatives |
| 1604 | such as (a|e|i|o|u). In general, the simplest construction |
| 1605 | that provides the required behaviour is usually the most |
| 1606 | efficient. Jeffrey Friedl's book contains a lot of discussion about optimizing regular expressions for efficient performance. |
| 1607 | |
| 1608 | <p> |
| 1609 | |
| 1610 | |
| 1611 | When a pattern begins with .* not in parentheses, or in |
| 1612 | parentheses that are not the subject of a backreference, and |
| 1613 | the PCRE_DOTALL option is set, the pattern is implicitly |
| 1614 | anchored by PCRE, since it can match only at the start of a |
| 1615 | subject string. However, if PCRE_DOTALL is not set, PCRE |
| 1616 | cannot make this optimization, because the . meta-character |
| 1617 | does not then match a newline, and if the subject string |
| 1618 | contains newlines, the pattern may match from the character |
| 1619 | immediately following one of them instead of from the very |
| 1620 | start. For example, the pattern |
| 1621 | |
| 1622 | <p> |
| 1623 | |
| 1624 | |
| 1625 | .*second |
| 1626 | |
| 1627 | <p> |
| 1628 | |
| 1629 | |
| 1630 | matches the subject "first\nand second" (where \n stands for |
| 1631 | a newline character), with the match starting at the seventh |
| 1632 | character. In order to do this, PCRE has to retry the match |
| 1633 | starting after every newline in the subject. |
| 1634 | |
| 1635 | |
| 1636 | <p> |
| 1637 | |
| 1638 | If you are using such a pattern with subject strings that do |
| 1639 | not contain newlines, the best performance is obtained by |
| 1640 | setting PCRE_DOTALL, or starting the pattern with ^.* to |
| 1641 | indicate explicit anchoring. That saves PCRE from having to |
| 1642 | scan along the subject looking for a newline to restart at. |
| 1643 | |
| 1644 | |
| 1645 | <p> |
| 1646 | |
| 1647 | Beware of patterns that contain nested indefinite repeats. |
| 1648 | These can take a long time to run when applied to a string |
| 1649 | that does not match. Consider the pattern fragment |
| 1650 | |
| 1651 | <p> |
| 1652 | |
| 1653 | |
| 1654 | (a+)* |
| 1655 | |
| 1656 | <p> |
| 1657 | |
| 1658 | |
| 1659 | This can match "aaaa" in 33 different ways, and this number |
| 1660 | increases very rapidly as the string gets longer. (The * |
| 1661 | repeat can match 0, 1, 2, 3, or 4 times, and for each of |
| 1662 | those cases other than 0, the + repeats can match different |
| 1663 | numbers of times.) When the remainder of the pattern is such |
| 1664 | that the entire match is going to fail, PCRE has in principle to try every possible variation, and this can take an |
| 1665 | extremely long time. |
| 1666 | An optimization catches some of the more simple cases such |
| 1667 | as |
| 1668 | |
| 1669 | <p> |
| 1670 | |
| 1671 | |
| 1672 | (a+)*b |
| 1673 | |
| 1674 | |
| 1675 | <p> |
| 1676 | |
| 1677 | where a literal character follows. Before embarking on the |
| 1678 | standard matching procedure, PCRE checks that there is a "b" |
| 1679 | later in the subject string, and if there is not, it fails |
| 1680 | the match immediately. However, when there is no following |
| 1681 | literal this optimization cannot be used. You can see the |
| 1682 | difference by comparing the behaviour of |
| 1683 | |
| 1684 | <p> |
| 1685 | |
| 1686 | |
| 1687 | (a+)*\d |
| 1688 | |
| 1689 | <p> |
| 1690 | |
| 1691 | |
| 1692 | with the pattern above. The former gives a failure almost |
| 1693 | instantly when applied to a whole line of "a" characters, |
| 1694 | whereas the latter takes an appreciable time with strings |
| 1695 | longer than about 20 characters. |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | <H2> |
| 1701 | References |
| 1702 | </H2> |
| 1703 | |
| 1704 | None. |
| 1705 | |
| 1706 | <H2> |
| 1707 | Warnings |
| 1708 | </H2> |
| 1709 | |
| 1710 | Regular expressions are case-sensitive. |
| 1711 | The pattern 'AAAA' will not match the sequence 'aaaa'. |
| 1712 | For this reason, both your pattern and the input sequences are |
| 1713 | converted to upper-case. |
| 1714 | |
| 1715 | <H2> |
| 1716 | Diagnostic Error Messages |
| 1717 | </H2> |
| 1718 | |
| 1719 | |
| 1720 | None. |
| 1721 | |
| 1722 | <H2> |
| 1723 | Exit status |
| 1724 | </H2> |
| 1725 | |
| 1726 | |
| 1727 | Always returns 0. |
| 1728 | |
| 1729 | <H2> |
| 1730 | Known bugs |
| 1731 | </H2> |
| 1732 | |
| 1733 | None. |
| 1734 | |
| 1735 | <h2><a name="See also">See also</a></h2> |
| 1736 | <table border cellpadding=4 bgcolor="#FFFFF0"> |
| 1737 | <tr><th>Program name</th> |
| 1738 | <th>Description</th></tr> |
| 1739 | <tr> |
| 1740 | <td><a href="fuzznuc.html">fuzznuc</a></td> |
| 1741 | <td>Search for patterns in nucleotide sequences</td> |
| 1742 | </tr> |
| 1743 | |
| 1744 | <tr> |
| 1745 | <td><a href="fuzztran.html">fuzztran</a></td> |
| 1746 | <td>Search for patterns in protein sequences (translated)</td> |
| 1747 | </tr> |
| 1748 | |
| 1749 | </table> |
| 1750 | |
| 1751 | |
| 1752 | <H2> |
| 1753 | Author(s) |
| 1754 | </H2> |
| 1755 | |
| 1756 | Peter Rice |
| 1757 | <br> |
| 1758 | European Bioinformatics Institute, Wellcome Trust Genome Campus, Hinxton, Cambridge CB10 1SD, UK |
| 1759 | |
| 1760 | <p> |
| 1761 | Please report all bugs to the EMBOSS bug team (emboss-bug © emboss.open-bio.org) not to the original author. |
| 1762 | <H2> |
| 1763 | History |
| 1764 | </H2> |
| 1765 | |
| 1766 | Written (1999) - Peter Rice. |
| 1767 | |
| 1768 | <H2> |
| 1769 | Target users |
| 1770 | </H2> |
| 1771 | This program is intended to be used by everyone and everything, from naive users to embedded scripts. |
| 1772 | |
| 1773 | <H2> |
| 1774 | Comments |
| 1775 | </H2> |
| 1776 | None |
| 1777 | |
| 1778 | |
| 1779 | </BODY> |
| 1780 | </HTML> |
| 1781 |