Skip to content

Commit

Permalink
Update comments to match new std.regex examples
Browse files Browse the repository at this point in the history
Example was switched to matchAll and 'g' was removed but the comment got left in. Another comment about match wasn't switched to matchAll.
  • Loading branch information
brad-anderson committed Jan 16, 2014
1 parent 6732bbb commit 5662eb9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions std/regex.d
Expand Up @@ -14,11 +14,10 @@
void main()
{
// Print out all possible dd/mm/yy(yy) dates found in user input.
// g - global: find all matches.
auto r = regex(r"\b[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9](?:[0-9][0-9])?\b");
foreach(line; stdin.byLine)
{
// Match returns a range that can be iterated
// matchAll() returns a range that can be iterated
// to get all subsequent matches.
foreach(c; matchAll(line, r))
writeln(c.hit);
Expand Down

0 comments on commit 5662eb9

Please sign in to comment.