Regex in VAST 8.6.2 and VAST 9.1 are divergent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Regex in VAST 8.6.2 and VAST 9.1 are divergent

Noschvie
Hello
the implementations of Regex in VA Smalltalk 9.1 seems to be different to 8.6.2.

Using VAST 8.6.2 with config map "VBRegex" version "1.4 mbany - TWD 1.3.1"
=============================
Applications:
    VBRegex 1.4 (mbany) TWD 1.3.1
    VBRegexExceptions 1.1

VAST 9.1 with config map "ENVY/Image Regex" version "V 9.1.0  [403]"
===============================
Applications:
    RegexCoreApp V 9.1.0  [403]
Required Maps: -none-

Test cases:
(a) '199' matchesRegex: '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])'.
-> true with both versions -> ok

(b) '199' matchesRegex: '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'. false
-> true with "VBRegex" -> ok
-> false with "ENVY/Image Regex" -> not ok

Norbert

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Regex in VAST 8.6.2 and VAST 9.1 are divergent

Mariano Martinez Peck-2
Hi Norbert,

Thanks for reporting this difference. Just for clarification, the "ENVY/Image Regex" is a port of the latest Pharo's regex, which is a continuation from VBRegex (Vassili Bykov original code). The port was not even done by us but by Wouter van Zuilen. It was on the VAST goodies. The port was so well done and the test coverage was so good that we decided (previous consensus with Wouter and all VAST team) to make it a feature and ship it. 

Anyway, I guess, somewhere in the history between the original VBRegex and the latest one, changed/broke that behavior you are reporting. I am also getting "false" in that expression on Pharo too. What I am not sure is what is the expected result. 

I am CCing Wouter too in case he has some clue. Else, I think we will have to debug to understand it. The good news is that we have a reproducible case :)
BTW, is that example the simplest/shortest you can make it fail? Or you could come up with a simpler one?

Do you have any insight or feeling on what is making that difference? Maybe one expression in particular? 

Thanks in advance, 


On Wed, Feb 20, 2019 at 6:00 AM Norbert Schlemmer <[hidden email]> wrote:
Hello
the implementations of Regex in VA Smalltalk 9.1 seems to be different to 8.6.2.

Using VAST 8.6.2 with config map "VBRegex" version "1.4 mbany - TWD 1.3.1"
=============================
Applications:
    VBRegex 1.4 (mbany) TWD 1.3.1
    VBRegexExceptions 1.1

VAST 9.1 with config map "ENVY/Image Regex" version "V 9.1.0  [403]"
===============================
Applications:
    RegexCoreApp V 9.1.0  [403]
Required Maps: -none-

Test cases:
(a) '199' matchesRegex: '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])'.
-> true with both versions -> ok

(b) '199' matchesRegex: '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'. false
-> true with "VBRegex" -> ok
-> false with "ENVY/Image Regex" -> not ok

Norbert

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Regex in VAST 8.6.2 and VAST 9.1 are divergent

Noschvie
Thanks Mariano,

Do you have any insight or feeling on what is making that difference? Maybe one expression in particular? 


this is another example: ( a | b ) is not euqal to ( b | a ) " a or b is not equal to b or a" and should describe a range of 0 to 99.

'25' matchesRegex: '([0-9]|[1-9][0-9])'.
'25' matchesRegex: '([1-9][0-9]|[0-9])'.

I don't know if this is a bug or feature of Regex ?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Regex in VAST 8.6.2 and VAST 9.1 are divergent

Mariano Martinez Peck-2


On Wed, Feb 20, 2019 at 9:38 AM Norbert Schlemmer <[hidden email]> wrote:
Thanks Mariano,

Do you have any insight or feeling on what is making that difference? Maybe one expression in particular? 


this is another example: ( a | b ) is not euqal to ( b | a ) " a or b is not equal to b or a" and should describe a range of 0 to 99.

'25' matchesRegex: '([0-9]|[1-9][0-9])'.
'25' matchesRegex: '([1-9][0-9]|[0-9])'.

I don't know if this is a bug or feature of Regex ?


hheheheh this is funny. I am not a regex expert.  But I just tried here: https://regex101.com/r/MqVXz8/1
and it also brings me matches...


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Regex in VAST 8.6.2 and VAST 9.1 are divergent

Mariano Martinez Peck-2
Hi Norbert,

I confirm this is really a bug in the implementation. Could you please send an email to vast support and we follow from there?
Then we share back the results to the forum.

Thanks!

On Wed, Feb 20, 2019 at 9:44 AM Mariano Martinez Peck <[hidden email]> wrote:


On Wed, Feb 20, 2019 at 9:38 AM Norbert Schlemmer <[hidden email]> wrote:
Thanks Mariano,

Do you have any insight or feeling on what is making that difference? Maybe one expression in particular? 


this is another example: ( a | b ) is not euqal to ( b | a ) " a or b is not equal to b or a" and should describe a range of 0 to 99.

'25' matchesRegex: '([0-9]|[1-9][0-9])'.
'25' matchesRegex: '([1-9][0-9]|[0-9])'.

I don't know if this is a bug or feature of Regex ?


hheheheh this is funny. I am not a regex expert.  But I just tried here: https://regex101.com/r/MqVXz8/1
and it also brings me matches...


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Regex in VAST 8.6.2 and VAST 9.1 are divergent

Mariano Martinez Peck-2
Just for the record, we opened a development case 64555 with the fix and tests and that will be integrated in 9.2.

Thanks Norbert for the report!

On Thu, Feb 21, 2019 at 8:26 AM Mariano Martinez Peck <[hidden email]> wrote:
Hi Norbert,

I confirm this is really a bug in the implementation. Could you please send an email to vast support and we follow from there?
Then we share back the results to the forum.

Thanks!

On Wed, Feb 20, 2019 at 9:44 AM Mariano Martinez Peck <[hidden email]> wrote:


On Wed, Feb 20, 2019 at 9:38 AM Norbert Schlemmer <[hidden email]> wrote:
Thanks Mariano,

Do you have any insight or feeling on what is making that difference? Maybe one expression in particular? 


this is another example: ( a | b ) is not euqal to ( b | a ) " a or b is not equal to b or a" and should describe a range of 0 to 99.

'25' matchesRegex: '([0-9]|[1-9][0-9])'.
'25' matchesRegex: '([1-9][0-9]|[0-9])'.

I don't know if this is a bug or feature of Regex ?


hheheheh this is funny. I am not a regex expert.  But I just tried here: https://regex101.com/r/MqVXz8/1
and it also brings me matches...


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
[hidden email]

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.