Regular expressions - PowerPoint PPT Presentation

1 / 4
About This Presentation
Title:

Regular expressions

Description:

Can combine ranges using logical operators. 300:!400 | !500:600 or 300: ... http://www.srs-user.org.uk/dokuwiki/doku.php?id=projects:basicsrsapi:perl ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 5
Provided by: Yon54
Category:

less

Transcript and Presenter's Notes

Title: Regular expressions


1
Regular expressions
  • NB Must appear within forward slashes (/)
  • Some operators
  • marks the start of a string /glu/
    begins with glu
  • marks the end of a string /ase/
    ends with ase
  • . dot is any single character
  • characters in square brackets are regarded as
    a set, any of which can be matched
  • 0-9 specifies a range of 1 to 9
  • the preceding group may be repeated zero or
    more times
  • the preceding group may be repeated one or more
    times
  • ? The preceding character/group occurs one or
    zero times

2
Some examples
  • /glu/ will find terms
    beginning with glu
  • /ase/ will find terms
    ending with ase
  • /c.t/ will find the
    words cat, cot, cut.
  • /c.t/ will find terms
    beginning with c and
  • then any number of
    characters and ending with t
  • /smiyth/ will find the words
    smith or smyth
  • /rho1-9/ will find the word rho
    followed by a number from 1-9
  • /mue?ller/ will find muller or
    mueller
  • NB. The symbol has two meanings
  • -within forward slashes / it means the
    preceding group may be
  • repeated zero or more times
  • - outside forward slashes it means any
    character

3
Numerical ranges
  • In a numerical index it is possible to search
    numerical ranges
  • - sequence lengths, mol. weights, dates.
  • the is used for specifying ranges and !
    for excluding values
  • 400500 all seq. with length between 400 and
    500
  • 400 all seq. with lengths greater
    than 400
  • 500 all seq. with lengths less than
    500
  • 400!500 all seq. with lengths bet. 400 and
    500 excluding 500
  • Can combine ranges using logical operators
  • 300!400 !500600 or 300600 !
    400500
  • Dates in SRS have 2 formats
  • YYYYMMDD 20021205
  • DD-MMM-YYYY 05-Dec-2002

4
Links programacion
  • http//nsaunders.wordpress.com/2006/12/01/automate
    d-srs-retrieval-using-perl-and-lwp/
  • http//www.srs-user.org.uk/dokuwiki/doku.php
  • http//www.ebi.ac.uk/srs/wiki/doku.php?idguides
    srsurlapi
  • http//www.srs-user.org.uk/dokuwiki/doku.php?idpr
    ojectsbasicsrsapiperl
Write a Comment
User Comments (0)
About PowerShow.com