Clear Filters
Clear Filters

Why does the REGEXPREP function return incorrect results in MATLAB 7.0 (R14)?

1 view (last 30 days)
In MATLAB 7.0 (R14), the REGEXPREP function (and several other REGEXP functions) on some installations returns incorrect results. For example:
str = 'My flowers may bloom in May';
pat = 'm(\w*)y';
regexprep(str, pat, 'April')
The correct output is:\n
My flowers April bloom in May
However, on my computer, I observe:\n
My flowers may bloom in May

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Nov 2020
Edited: MathWorks Support Team on 6 Nov 2020
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
We have verified there is a bug in MATLAB 7.0 (R14) in the way that MATLAB handles an environmental variable on the system PATH called ICU_DATA.
For information about how to resolve this issue, see the following URL:

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!