how to compare special characters in string

4 views (last 30 days)
I have a strings
I want to find if '$' is present in the string or not. Can any one tell me how to do that? Using which string functions I can achieve that?

Sign in to comment.

Accepted Answer

Sara on 10 Jul 2014
If index is empty, $ is not in the string
index = strfind(str,'$');
  1 Comment
ananth a
ananth a on 27 Nov 2019
if I want to search with '$(0)'. how can i do that?
Because i have to search with {"some name": value, this part.

Sign in to comment.

More Answers (0)


Find more on Characters and Strings in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by