[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):
computer
ans =
'PCWIN64'
version
ans =
'9.5.0.882065 (R2018b) Prerelease'
regexprep ('tes)t', ')', '')
ans =
'test'
regexprep ('tes)t', ')', 'abc')
ans =
'tesabct'
regexprep ('tes)t', '(', '')
ans =
'tes)t'
regexprep ('te(s)t', '(s)', '')
ans =
'te()t'
and e.g.,:
>> regexprep ('tes]t', ']', 'abc')
ans =
'tesabct'
>> regexprep ('tes[]t', '[]', 'abc')
ans =
'tes[]t'
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:
<http://savannah.gnu.org/bugs/?54592>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Docf, 2018/08/29
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Pantxo Diribarne, 2018/08/29
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Docf, 2018/08/29
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Pantxo Diribarne, 2018/08/30
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Rik, 2018/08/30
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Docf, 2018/08/31
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Mike Miller, 2018/08/31
- [Octave-bug-tracker] [bug #54592] regexprep gets confused when parentheses should be processed, Rik, 2018/08/31