instrrev/strrevfind

Find character in string from EOS (right-hand end)
1.1K Downloads
Updated 20 Feb 2007

No License

From the string end (ie right-hand-side) finds position of the kth character matching the specified pattern.

Syntax: INSTRREV (string, pattern, [right_match_count])

Returns:
- matching position if found match
- 0 otherwise

Returns first matching position if no right_match_count specified.

NB: function name inspired from VBS. Could be renamed "strrevfind.m" to fit Matlab nomenclature. Let me know what you think.

Cite As

Tseviet Tchen (2024). instrrev/strrevfind (https://www.mathworks.com/matlabcentral/fileexchange/14012-instrrev-strrevfind), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Characters and Strings in Help Center and MATLAB Answers
Acknowledgements

Inspired: Manchester

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0