Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kazinator
on Feb 13, 2015
|
parent
|
context
|
favorite
| on:
A regular expression to check for prime numbers
POSIX regular expressions (file glob patterns, BRE's and ERE's) have more features than regexes in old CS papers, but they are still regular: they compile to automata with no backtracking.
schoen
on Feb 13, 2015
[–]
The ERE described in egrep(1) has backreferences which can match non-regular languages. Are you thinking of some other notion of ERE?
btilly
on Feb 13, 2015
|
parent
[–]
He is thinking of what POSIX specified, which does not have backreferences. See
http://www.regular-expressions.info/posix.html
for details.
schoen
on Feb 13, 2015
|
root
|
parent
[–]
Aha, I didn't know about the difference between POSIX ERE and GNU ERE. Thank you!
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: