Quantcast
Channel: An integer (a string of digits) is $\text{/[0-9][0-9]$\ast$/}$. (Why isn't it just $\text{/[0-9]$\ast$/}$?) - Computer Science Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Pratik Haware for An integer (a string of digits) is...

$[0-9]*$ includes all finite strings of the digits including the empty string $\epsilon$ (Some books denote the empty string by $\lambda$). An integer, by definition, has at least one digit. Hence,...

View Article



Answer by nir shahar for An integer (a string of digits) is...

The empty word $\epsilon$ isn't an integer. Integers are $0, 1, 2, 3, \dots, 10, 11, \dots$Clearly none of them have $0$ letters when you write them, and hence they are not $\epsilon$.Hence, you want...

View Article

Image may be NSFW.
Clik here to view.

An integer (a string of digits) is $\text{/[0-9][0-9]$\ast$/}$. (Why isn't it...

I am currently studying the textbook Speech and Language Processing, 3rd edition (draft), by Jurafsky and Martin. Chapter 2.1.1 Basic Regular Expression Patterns says the following:The regular...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images