Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
boblauer
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
boblauer
2y ago
To answer your question, it's to give the appearance of fairness. It's the same reason Russia holds elections.
2.
▲
by
boblauer
12y ago
Counting capturing groups is a solved problem - http://stackoverflow.com/questions/16046620/regex-to-count-t...
3.
▲
by
boblauer
12y ago
You can get the index of the match via the .exec function. It returns an array. The first element is the match, and then an element for each capturing group. You'd need to keep track of how many sub-capturing groups each individual