Re: [Gambas-user] Match operator always matches Null
On Sat, 28 Feb 2015, Beno?t Minisini wrote: > Le 27/02/2015 00:34, Tobias Boege a ?crit : > > On Fri, 27 Feb 2015, Tobias Boege wrote: > >> Hi, > >> > >> I feel like I already asked about this but didn't find it in my archives, > >> so > >> I probably didn't... We saw that the Match operator always matches the > >> emtpy > >> string > >> > > > > In case you didn't know, the "emtpy string" is another expression for "empty > > string". > > > > Fixed in revision #6919: Now the emtpy string only matches the etpmy > string. :-) > === --- regexp.c(revision 6918) +++ regexp.c(working copy) @@ -170,6 +170,9 @@ CREGEXP tmp; bool ret = FALSE; + if (lsubject <= 0) + return (lpattern <= 0); + CLEAR(&tmp); tmp.ovecsize = OVECSIZE_INC; GB.Alloc(POINTER(&tmp.ovector), sizeof(int) * tmp.ovecsize); === I don't think it's as simple as that :-) For now $ gbx3 -e 'Null Match "a*"' False but "a*" is zero or more a's and Null should match it. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Match operator always matches Null
Le 27/02/2015 00:34, Tobias Boege a écrit : > On Fri, 27 Feb 2015, Tobias Boege wrote: >> Hi, >> >> I feel like I already asked about this but didn't find it in my archives, so >> I probably didn't... We saw that the Match operator always matches the emtpy >> string >> > > In case you didn't know, the "emtpy string" is another expression for "empty > string". > Fixed in revision #6919: Now the emtpy string only matches the etpmy string. :-) -- Benoît Minisini -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Match operator always matches Null
On Fri, 27 Feb 2015, Tobias Boege wrote: > Hi, > > I feel like I already asked about this but didn't find it in my archives, so > I probably didn't... We saw that the Match operator always matches the emtpy > string > In case you didn't know, the "emtpy string" is another expression for "empty string". -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Match operator always matches Null
Hi, I feel like I already asked about this but didn't find it in my archives, so I probably didn't... We saw that the Match operator always matches the emtpy string, even if the pattern wants non-empty strings: $ gbx3 -e 'Null Match "a"' True Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user