octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #48377] regex cannot process nested token grou


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #48377] regex cannot process nested token groups
Date: Sat, 2 Jul 2016 12:17:28 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

URL:
  <http://savannah.gnu.org/bugs/?48377>

                 Summary: regex cannot process nested token groups
                 Project: GNU Octave
            Submitted by: lachlan
            Submitted on: Sat 02 Jul 2016 12:17:26 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

I would expect


[S, E, TE, M, T, NM, SP] = regexp ("  abc  def", "(\\s+(\\S+))+");


to give four values in T: "  abc", "abc", "  def", "def".  However, it only
gives two: "  def", "def":


T = 
{
  [1,1] = 
  {
    [1,1] =   def
    [1,2] = def
  }
}


I haven't checked whether Matlab handles nested groups, but if this pattern
isn't handled correctly, it should report an error, rather than giving the
wrong result.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48377>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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