Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 15, 2006 DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Added match expressions. http://www.digitalmars.com/d/changelog.html |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Nifty feature. Would be handy if regex searches be included as well - for continuous buffers and for chunked buffers. Chr. Grade In article <dt088d$1svm$1@digitaldaemon.com>, Walter Bright says... > >Added match expressions. > >http://www.digitalmars.com/d/changelog.html > |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chr. Grade | "Chr. Grade" <Chr._member@pathlink.com> wrote in message news:dt0ait$1v78$1@digitaldaemon.com... > > Nifty feature. Would be handy if regex searches be included as well - for continuous buffers and for chunked buffers. Not sure what you mean? |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Wed, 15 Feb 2006 14:49:14 -0800, Walter Bright wrote: > "Chr. Grade" <Chr._member@pathlink.com> wrote in message news:dt0ait$1v78$1@digitaldaemon.com... >> >> Nifty feature. Would be handy if regex searches be included as well - for continuous buffers and for chunked buffers. > > Not sure what you mean? Oh, I'm positive I don't know what Chr. means :-) What is a "continuous buffer" in this context? What is a "chunked buffer"? -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 16/02/2006 10:11:17 AM |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Nice, these match expressions make things really handy. At first I was confused on what I would use them for, but I started programming for a little bit and already found a use for them. Namely, assert(filename ~~ "*.wav"), assuming I understand it correctly.
Walter Bright wrote:
> Added match expressions.
>
> http://www.digitalmars.com/d/changelog.html
>
>
>
|
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | One thing I forgot to ask, do we have
this()
in
{
}
out
{
}
body
{
}
Yet? Thanks.
~ Clay
clayasaurus wrote:
> Nice, these match expressions make things really handy. At first I was confused on what I would use them for, but I started programming for a little bit and already found a use for them. Namely, assert(filename ~~ "*.wav"), assuming I understand it correctly.
>
> Walter Bright wrote:
>> Added match expressions.
>>
>> http://www.digitalmars.com/d/changelog.html
>>
>>
>>
|
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Added match expressions.
Interesting. So where can I find documentation on pattern syntax? The docs for std.regexp doesn't seem to mention it. Is it just the classic textbook syntax, or are there differences?
Sean
|
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Wed, 15 Feb 2006 13:52:12 -0800, Walter Bright wrote: > Added match expressions. Too lazy to test sorry. Do match expressions support Unicode or just ASCII? -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 16/02/2006 10:44:23 AM |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | "clayasaurus" <clayasaurus@gmail.com> wrote in message news:dt0dm6$228a$1@digitaldaemon.com... > Nice, these match expressions make things really handy. At first I was confused on what I would use them for, but I started programming for a little bit and already found a use for them. Namely, assert(filename ~~ "*.wav"), assuming I understand it correctly. It's the other way around, the regexp is on the left. Also, operating system wildcard thing isn't the one used, it's real regular expressions from std.regexp. So you'd write it as: assert(".wav$" ~~ filename); which means any string ending in ".wav". std.path.fnmatch() does operating system style wildcards like "*.wav" - I could make that work with the match expressions too if there's a desire (because operator overloading works with it!). Another example of things you can do: assert("^abc" ~~ string); // (1) matches any string that starts with the string "abc". It's a little klunky to do otherwise, assert(string.length >= 3 && string[0..3] == "abc"); // (2) Currently, evaluating ("^abc"~~string) invokes the full std.regexp machinery. But a compiler is free to optimize (1) into (2). I'm thinking of Eric and Don's examples of generating custom recognizers for static regex strings. This could make D's regex support into a real screamer. |
February 15, 2006 Re: DMD 0.147 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | "Sean Kelly" <sean@f4.ca> wrote in message news:dt0ds9$226k$1@digitaldaemon.com... > Walter Bright wrote: >> Added match expressions. > > Interesting. So where can I find documentation on pattern syntax? The docs for std.regexp doesn't seem to mention it. Is it just the classic textbook syntax, or are there differences? There's a link in the std_regexp page to it: www.digitalmars.com/ctg/regular.html It's the classic syntax. |
Copyright © 1999-2021 by the D Language Foundation