MATLAB: How To Detect Special Characters special charaters How could I find out if there are any special characters in my string? Suppose I have the string '1asdf?', how could I detect if there is a special character in there? Best Answer Use isstrprop with category 'alphanum' to identify letters and digits. Related SolutionsMATLAB: Please explain function of [\w.]+ \w a word character [a-z_A-Z0-9] followed by any character (the .) matched one or more times ( +). MATLAB: How to compare two sentences with similar words First, split each sentence into the individual wordswords_1 = split(string1,[" ",","]);words_2 = split(string2,[" ",","]);Then check if they share any words (comparing lowercase versions)common_words = intersect(lower(words_1),lower(words_2))share_words = ~isempty(common_words); Related QuestionUnexpected comma in regexp outputHow to check if string contains some special characterLast Letter in a Text string
Best Answer