CS110 Chapter Notes - Chapter 5: Finite-State Machine, Regular Expression, Eval

47 views14 pages

Document Summary

This document is dedicated to discussing about the fundamental role of finite state machine (fsm) in regular expression pattern recognition. In terms of lay-man words, regular expression (regex) is a systematic approach to define the pattern of words or strings. First, it involves all literals i. e. letters, digits and other non-alphanumeric symbols (i. e. #, ~, !, =, etc. ). Square brackets i. e. [] are used to group items together and they imply to any one of the items enclosed, whereas round brackets i. e. () are used to group different patterns together. literals, which when not escaped bring special. ), when not escaped, refers to all possible symbols. When symbol ^ is used, it refers to the first occurrence in a line or sentence. Alternatively, when a regular expression ends with a dollar ($) sign, it refers to the last occurrence in a line or sentence.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents