Help with Regular Expressions (std.regex)

Samir samir at aol.com
Mon Mar 4 18:51:29 UTC 2019


On Sunday, 3 March 2019 at 19:27:17 UTC, user1234 wrote:
> oops forgot the bang
>
>   auto allMatches = matchAll(line, pattern).map!(a => 
> a.hit).array;

Thanks, user1234!  Looks like `map` is another topic I need to 
read up upon.  I slightly modified your suggestion and went with:

auto allMatches = matchAll(line, pattern).map!(a => 
to!int(a.hit)).array;

which also takes care of converting the string to int.

Samir



More information about the Digitalmars-d-learn mailing list