Behavior of the matlab regexptranslate function
Ben Abbott
bpabbott at mac.com
Fri Mar 21 19:06:57 CDT 2008
On Mar 21, 2008, at 4:02 PM, David Bateman wrote:
> Ben Abbott wrote:
>>
>> David,
>>
>> I have a license, but have not yet installed it.
>>
>> Please post the tests, and if no one steps up, I'll install 2008a
>> and run them.
>>
>> Ben
>>
>
> Something like
>
> regexptranslate ('wildcard', '*a?b*c?')
ans =
.*a.b.*c.
> regexptranslate ('wildcard','?a*b?c*')
ans =
.a.*b.c.*
> regexptranslate ('wildcard','*a? *c?')
ans =
.*a. .*c.
> regexptranslate ('wildcard', '?a* ?c*')
ans =
.a.* .c.*
> regexptranslate ('escape', '.a/b\c[d]e$f(g)')
ans =
\.a/b\\c\[d\]e\$f\(g\)
I must admit, having just installed 2008a and never looked at what
regexptranslate is intended to do, those results all look surprising.
Hopefully, they are what you expected?
Ben
More information about the Octave-maintainers
mailing list