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

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

[Octave-bug-tracker] [bug #37914] regexprep error when replacing "("


From: anonymous
Subject: [Octave-bug-tracker] [bug #37914] regexprep error when replacing "("
Date: Thu, 13 Dec 2012 11:26:17 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0

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

                 Summary: regexprep error when replacing "("
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Do 13 Dez 2012 11:26:16 UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Joerg
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

regexprep returns error when the second input argument contains "(":


regexprep('Hello _ ( ) ','( ','(')
error: regexprep: missing ) at position 2 of expression

octave:2> regexprep('Hello _ ( ) ','( ','_')
error: regexprep: missing ) at position 2 of expression

octave:3> regexprep('Hello _ ( ) ','(','(  ')
error: regexprep: missing ) at position 1 of expression


However, "(" in the third input argument is ok


octave:1> regexprep('Hello _ ( ) ','_ ','_')
ans = Hello _( ) 
octave:2> regexprep('Hello _ ( ) ','_ ','(')
ans = Hello (( ) 


Basically the same is true for ")"


octave:3> regexprep('Hello _ ( ) ',')','(  ')
error: regexprep: unmatched parentheses at position 0 of expression
octave:3> regexprep('Hello _ ( ) ',' ) ','(  ')
error: regexprep: unmatched parentheses at position 1 of expression

octave:3> regexprep('Hello _ ( ) ',' _ ',' ))) ')
ans = Hello ))) ( ) 





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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