Bug 245 – Typo in Regexp article

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P5
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-07-07T03:20:00Z
Last change time
2014-02-15T13:28:46Z
Assigned to
bugzilla
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2006-07-07T03:20:29Z
"To check for a match of a string s with a regular expression in Ruby, use the ~= operator," should be "use the =~ operator". (Ruby isn't D!) And the example which says: sub(s, "[ar]", delegate char[] (RegExp m) { return toupper(m.match(0)); }, "g"); // result: StRAp A Rocket engine on A chicken. would be even more impressive with the new delegate syntax as: sub(s, "[ar]", (RegExp m) { return toupper(m.match(0)); }, "g"); // result: StRAp A Rocket engine on A chicken. Optional: mention that toupper() comes from std.string.
Comment #1 by bugzilla — 2006-07-07T22:50:45Z
Fixed.