[Pharo-dev] [Glass] Bug in Regex?

Max Leske maxleske at gmail.com
Thu Feb 21 03:17:42 EST 2019


Hi Mariano,

Yes, there is indeed such a bug (if it hasn't been fixed in an update to 
VBRegex that is). The bug is simple to work around though, as all you 
have to do is sort your branch (|) terms by length. Here's the comment 
I've written for a regex generating method is use:

" The sorting is very important because VB-Regex aborts early on 
branches. Example:
		'bl' matchesRegex: 'b|bl' --> false
	The solution is to sort by length (longest first), then alphabetically, 
with the short group optimization at the end. "


Cheers,
Max


On 21 Feb 2019, at 3:33, Mariano Martinez Peck wrote:

> On Wed, Feb 20, 2019 at 5:56 PM Esteban Maringolo via Glass <
> glass at lists.gemtalksystems.com> wrote:
>
>> What a good case to have GToolkit visualizations help debugging this 
>> RX
>> tree ;)
>>
>>
> Oh yeah..And look Doru, they have some stuff on the top right 
> "Explanation"
> panel: https://regex101.com/r/MqVXz8/1
>
>
> -- 
> Mariano
> https://twitter.com/MartinezPeck
> http://marianopeck.wordpress.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20190221/5bf392a6/attachment.html>


More information about the Pharo-dev mailing list