Hello everyone,
running on GS 3.4.3 (with image built from extent0.seaside.dbf), I tried to build a Regex pattern to match an UUID. Unfortunately the following expression evaluates to false: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}' asRegex matches: '964d5d07-1834-0d00-a106-47ae08909eb2' The same code evaluates to true in Pharo. It seems that the handling of the quantifiers in braces doesn't work as expected. All Tests (nearly 200) in Regex-Tests-Core Package are passing, but I did not see any similar test case with quantifiers. Could this be considered as a bug or is there something wrong with the pattern? Should the Regex-Package in Pharo and GemStone be/behave the same? Br, Ralph _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Hello Ralph ...
The Regex should be compatible with Pharo, but at this point in time, I think we need to start thinking about the fact that "matching Pharo" has to be qualified by version ... the original code was written to "match Pharo" at the time ... I'd be interested in hearing opinions from other folks ... I assume that if the new test case can be handled correctly without causing existing tests to fail, then it's a no-brainer to include the fix. If fixing this case breaks other cases, then I would think it might need to be implemented in such a way that users can choose theold implementation or the new implementation ... If I'm not mistaken, Pharo might be moving to "match Perl" so this might be another factor to consider ... Dale On 2/4/19 2:09 PM, Ralph Mauersberger via Glass wrote: > Hello everyone, > > running on GS 3.4.3 (with image built from extent0.seaside.dbf), I > tried to build a Regex pattern to match an UUID. > > Unfortunately the following expression evaluates to false: > > '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}' > asRegex matches: '964d5d07-1834-0d00-a106-47ae08909eb2' > > The same code evaluates to true in Pharo. It seems that the handling > of the quantifiers in braces doesn't work as expected. > > All Tests (nearly 200) in Regex-Tests-Core Package are passing, but I > did not see any similar test case with quantifiers. > > Could this be considered as a bug or is there something wrong with the > pattern? > > Should the Regex-Package in Pharo and GemStone be/behave the same? > > Br, > > Ralph > > > > > > > > > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Hi,
> On 5 Feb 2019, at 00:08, Dale Henrichs via Glass <[hidden email]> wrote: > > Hello Ralph ... > > The Regex should be compatible with Pharo, but at this point in time, I think we need to start thinking about the fact that "matching Pharo" has to be qualified by version ... the original code was written to "match Pharo" at the time … > > I'd be interested in hearing opinions from other folks ... > > I assume that if the new test case can be handled correctly without causing existing tests to fail, then it's a no-brainer to include the fix. If fixing this case breaks other cases, then I would think it might need to be implemented in such a way that users can choose theold implementation or the new implementation ... > > If I'm not mistaken, Pharo might be moving to "match Perl" so this might be another factor to consider … But we didn’t change the actual regex version of Pharo which is the same since the beginning. yes we will eventually change it : we will do a pcre binding to be 100% compatible with the outside world :) But for now, is the same as always. Esteban > > Dale > > On 2/4/19 2:09 PM, Ralph Mauersberger via Glass wrote: >> Hello everyone, >> >> running on GS 3.4.3 (with image built from extent0.seaside.dbf), I tried to build a Regex pattern to match an UUID. >> >> Unfortunately the following expression evaluates to false: >> >> '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}' asRegex matches: '964d5d07-1834-0d00-a106-47ae08909eb2' >> >> The same code evaluates to true in Pharo. It seems that the handling of the quantifiers in braces doesn't work as expected. >> >> All Tests (nearly 200) in Regex-Tests-Core Package are passing, but I did not see any similar test case with quantifiers. >> >> Could this be considered as a bug or is there something wrong with the pattern? >> >> Should the Regex-Package in Pharo and GemStone be/behave the same? >> >> Br, >> >> Ralph >> >> >> >> >> >> >> >> >> _______________________________________________ >> Glass mailing list >> [hidden email] >> http://lists.gemtalksystems.com/mailman/listinfo/glass > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |