FInding several strings in one string.

Functions compares input and search multiple items in two modes.

現在この提出コンテンツをフォロー中です。

function [antwort,wo] = multistrfind (input, {wassuchen1; wassuchen2; etc..}, mode)

finds multiple "wassuchen" string-inputs, concatenated in a cell-array. each item to be found has to be in one row.
i.e. wassuchen = {'item1';'item2';'item3'}. Item can consist of one or several string signs.

"input" has to be a single, one row string.

in the mode "comp" the functions answers
- 0 if wassuchen-strings do not accord with input,
- 1 if one of the items in wassuchen-string was found in input.
the mode does not show, which item was found!

in the mode "find" the function looks for every item in "wassuchen" and gives out two variables comprising
in "antwort" the elements found and in "wo" where the element was found.
"wo" is a cell array containing double elements,
"antwort" is a cell array containing strings.
one item per row!

引用

Fabian Tomaschek (2026). FInding several strings in one string. (https://jp.mathworks.com/matlabcentral/fileexchange/29870-finding-several-strings-in-one-string), MATLAB Central File Exchange. に取得済み.

カテゴリ

Help Center および MATLAB AnswersCharacters and Strings についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0