SLIDE 1
Regular Expressions Reminder: Commonly used special symbols in - - PowerPoint PPT Presentation
Regular Expressions Reminder: Commonly used special symbols in - - PowerPoint PPT Presentation
Regular Expressions Reminder: Commonly used special symbols in Python regular expressions Symbol Meaning . matches any character + 1 or more * 0 or more () capture group \d digit \D non-digit \s whitespace \S non-whitespace \w
SLIDE 2
SLIDE 3
Character sets: [abcd] matches the letters a, b, c, d
SLIDE 4
Character sets: [abcd] matches the letters a, b, c, d
String: gray Regex: gr[abcd]y
SLIDE 5
Character sets: [abcd] matches the letters a, b, c, d
String: gray Regex: gr[abcd]y Match: gray
SLIDE 6
Character sets: [abcd] matches the letters a, b, c, d
String: grey Regex: gr[abcd]y
SLIDE 7
Character sets: [abcd] matches the letters a, b, c, d
String: grey Regex: gr[abcd]y Match: Does not match!
SLIDE 8
A character set matches exactly one letter
String: -ATGGTCTA- Regex: -[ATGC]-
SLIDE 9
A character set matches exactly one letter
String: -ATGGTCTA- Regex: -[ATGC]- Match: Does not match!
SLIDE 10
A character set matches exactly one letter
String: -ATGGTCTA- Regex: -[ATGC]+-
SLIDE 11
A character set matches exactly one letter
String: -ATGGTCTA- Regex: -[ATGC]+- Match: -ATGGTCTA-
SLIDE 12
Negative character sets: [^abcd] matches anything but a, b, c, d
String: gray Regex: gr[^abcd]y
SLIDE 13
Negative character sets: [^abcd] matches anything but a, b, c, d
String: gray Regex: gr[^abcd]y Match: Does not match!
SLIDE 14
Negative character sets: [^abcd] matches anything but a, b, c, d
String: grey Regex: gr[^abcd]y
SLIDE 15