[Top][All Lists]

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

[Octave-bug-tracker] [bug #54592] regexprep gets confused when parenthes

From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed
Date: Fri, 31 Aug 2018 05:12:42 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

Follow-up Comment #6, bug #54592 (project octave):

ans =
ans =
    ' (R2018b) Prerelease'
regexprep ('tes)t', ')', '')
ans =
regexprep ('tes)t', ')', 'abc')
ans =
regexprep ('tes)t', '(', '')
ans =
regexprep ('te(s)t', '(s)', '')
ans =

and e.g.,:

>> regexprep ('tes]t', ']', 'abc')
ans =
>> regexprep ('tes[]t', '[]', 'abc')
ans =

Indeed, as the OP wrote Matlab apparently searches for matching parens / sq.
brackets before deciding they're to be treated as special characters.


Reply to this item at:


  Message sent via Savannah

reply via email to

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