返回卡包市场

Regular expressions/regular language

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 10内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (10 张)

#1
正面 (问题)

What is a regular expression?

背面 (解答)

A notation used to describe a pattern of characters in an object or a set

#2
正面 (问题)

Using a and b, what is the notation used for concatenation?

背面 (解答)

• ab : meaning a string consisting of symbol a followed by symbol b • ba : meaning a string consisting of symbol b followed by symbol a

#3
正面 (问题)

What does the notation a+ mean?

背面 (解答)

+ means pattern matches one or more “a”s going {a,aa,aaa,…}

#4
正面 (问题)

What does the notation a* mean?

背面 (解答)

• means pattern matches zero or more “a”s going {0,a,aa,aaa,…}

#5
正面 (问题)

What does the notation ab?c mean?

背面 (解答)

? means it matches the preceding character one or zero times, giving {ab,abc}

#6
正面 (问题)

What does the notation a | b mean?

背面 (解答)

means pattern matches the symbol “a” or the symbol “b”

#7
正面 (问题)

What is the series of rules to follow?

背面 (解答)

• operations + and * are highest priority and always carried out first • Concatenation is carried out next • operation | (or) is carried out last

#8
正面 (问题)

What are the string searching applications, regular expressions can be used in?

背面 (解答)

• Searching and locating files and folders • Find or Search and Replace text strings in a block of text • Parsing or analysing syntax in computer languages • Searching for identifiers in a computer program • Validation for entry fields in a database / online form • Pattern matching with commands in an operating system

#9
正面 (问题)

What are the definitions of the terms used for the following string searching? • Literal • Metacharacter • Escape character • Search Expression

背面 (解答)

• Literal - any character that is used in a search expression • Metacharacter - these are special characters that have a unique meaning such as: ^ or * • Escape character - using the \ (backslash) in front of a metacharacter allows it to be used in a search expression as a literal, for example: \^ • Search Expression - The regular expression that is used to find the target string

#10
正面 (问题)

What is a regular language?

背面 (解答)

• A formal language that can be represented by regular expressions. • A language that is acceptable for use by a finite state machine • Regular languages have to be constructed from a finite number of states