Y
Hacker News
new
|
ask
|
show
|
jobs
by
radiojosh
928 days ago
That was a great read, but there was one thing I didn't understand: Why would the regex string have ".
" twice in a row? What does ".
.
" find that ".
" doesn't find? Does that just mean "at least two characters"?
2 comments
rjbwork
928 days ago
It means specifically 2 characters, and is equivalent to .{2}
..+ or ...* are ways of writing "at least two characters".
link
bn-usd-mistake
928 days ago
A single `.` matches exactly one character. `..` matches exactly two characters (not more, not less).
link
..+ or ...* are ways of writing "at least two characters".