24.12.2013 Views

Slides - University of Washington

Slides - University of Washington

Slides - University of Washington

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>University</strong> <strong>of</strong> <strong>Washington</strong><br />

Ling472 Introduction to Computational Linguistics<br />

Lecture 1:<br />

Introduction<br />

More RegEx<br />

* accepts zero or more <strong>of</strong> the preceding element<br />

this is the canonical ‘greedy’ operator<br />

? accepts zero or one <strong>of</strong> the preceding element(s)<br />

+ accepts one or more <strong>of</strong> the preceding element(s)<br />

{n} accepts n <strong>of</strong> the preceding element(s)<br />

{n,} accepts n or more <strong>of</strong> the preceding element(s)<br />

{n,m} accepts n to m <strong>of</strong> the preceding element(s)<br />

(pattern)<br />

defines a capture group which can be referred to<br />

later via \1<br />

Monday, April 1, 2013<br />

54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!