Download presentation
Presentation is loading. Please wait.
1
LING 388: Computers and Language
Lecture 12
2
Administrivia Apologies for the wrong index.html page loaded:
problem fixed yesterday Reminder: Homework 5 due on Wednesday midnight
3
Unicode characters ok in Python 3.x
Python regex Unicode characters ok in Python 3.x Summary (so far): \w a character [A-Za-z0-9_] \d [0-9] \b word boundary \s space character [ \t\n\r\f\v] Operators: * zero or more repeats + one or more repeats ( ) grouping Raw string (avoid escaping \): r"\w+" Negation: \W anything not in \w \D anything not in \d Full Documentation:
4
Review examples
5
Review examples
6
Review examples
7
Python regex Other useful meta-characters: ^ matches beginning of line
$ matches end of line \n n = group number, must match identically to group
8
Python regex More examples from
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.