Re: Is it std.regex, or is it me.

2017-03-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, March 20, 2017 14:36:32 Russel Winder via Digitalmars-d-learn wrote: > Given the following, where X and Y mark the spot: > > X epochRegex = regex("([0-9])+:"); > Y aEpochCapture = matchFirst(aVersionString, epochRegex); > Y bEpochCapture = matchFirst(bVersionString, epochRegex); >

Re: Is it std.regex, or is it me.

2017-03-20 Thread Kagamin via Digitalmars-d-learn
A file stream would be another example of a thing that can't be naturally const even if you opened it for reading.

Is it std.regex, or is it me.

2017-03-20 Thread Russel Winder via Digitalmars-d-learn
Given the following, where X and Y mark the spot: X epochRegex = regex("([0-9])+:"); Y aEpochCapture = matchFirst(aVersionString, epochRegex); Y bEpochCapture = matchFirst(bVersionString, epochRegex); If X or Y are const or immutable the code fails to compile. Only if both