help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [bug] aRegexResults at: n throws error if the captu


From: Mark Bratcher
Subject: Re: [Help-smalltalk] [bug] aRegexResults at: n throws error if the captured at n is empty string
Date: Tue, 30 Jun 2015 04:00:15 -0700

Issue status update for http://smalltalk.gnu.org/project/issue/835 Post a follow up: http://smalltalk.gnu.org/project/comments/add/835

Project:      GNU Smalltalk
Version:      <none>
Component:    Base classes
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  sergio
Updated by:   mbratch
Status:       active

This is still a problem. Here's my related example:

st> m := 'a=' =~ '(.*?)=(.*)'
Object: Interval new "<-0x4ce2bdf0>" error: Invalid index 1: index out
of range
SystemExceptions.IndexOutOfRange(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.IndexOutOfRange class>>signalOn:withIndex:
(SysExcept.st:660)
Interval>>first (Interval.st:245)
Kernel.MatchingRegexResults>>at: (Regex.st:382)
Kernel.MatchingRegexResults>>printOn: (Regex.st:305)
Kernel.MatchingRegexResults(Object)>>printString (Object.st:534)
Kernel.MatchingRegexResults(Object)>>printNl (Object.st:571)


The regex `(.*?)=(.*)' should match `'a='` without an exception, and
then `m at: 2` should yield `nil`.

Full problem description is posted at Stackoverflow.com [1].
[1]
http://stackoverflow.com/questions/31116594/gst-regular-expression-misma...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]