Skip to content

Commit

Permalink
Changelog for std.regex
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryOlshansky committed Apr 19, 2016
1 parent e62921e commit d2740c4
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions changelog.dd
Expand Up @@ -13,6 +13,9 @@ $(BUGSTITLE Library Changes,
$(LI $(XREF uni, isAlphaNum), which is analogous to $(XREF ascii, isAlphaNum)
was added.)
$(LI $(XREF regex, regex) now supports inline comments with (?#...) syntax.
$(LI std.regex had numerous optimization applied, compile-time $(XREF regex, ctRegex)
should now be generally faster then the run-time version.)
$(LI $(XREF regex, regex) now supports matching multiple patterns in one go.)
)

$(BUGSTITLE Library Changes,
Expand All @@ -26,8 +29,7 @@ Previously, Posix systems would attempt to close every file descriptor from 3
descriptors need closing.
)

$(LI $(LNAME2 nextPow2, Added nextPow2 and truncPow2 to std.math.)
$(P $(XREF range, padLeft) and $(XREF range, padRight) are functions for
$(LI $(P $(XREF range, padLeft) and $(XREF range, padRight) are functions for
padding ranges to a specified length using the given element.
)

Expand All @@ -41,6 +43,21 @@ assert("Hello World!".padRight('!', 15).equal("Hello World!!!!"));
-------
)

$(LI $(XREF regex, regex) now supports matching multiple patterns in one go.
-------
import std.regex;
// multi-pattern regex
auto multi = regex([`\d+,\d+`,`(a-z]+):(\d+)`]);
auto m = "abc:43 12,34".matchAll(multi);
assert(m.front.whichPattern == 2);
assert(m.front[1] == "abc");
assert(m.front[2] == "43");
m.popFront();
assert(m.front.whichPattern == 1);
assert(m.front[1] == "12");
-------
)

Macros:
TITLE=Change Log

Expand Down

0 comments on commit d2740c4

Please sign in to comment.