從列表中獲取字串,其中字串包含定義的文本你好,
有人能幫助我嗎?我創建了一個看起來像這樣的清單:
{“C1234_here_is_some_text”,“C1235_here_is_some_other_text”,“C1236_you_get_the_idea”,...,“C2000_still_dont_ends_here”}
我想獲取列表的完整字串,其中字串的第一部分(例如“C1234”)是“C1999”。
這裡正確的程式碼是什麼?
先感謝您
進階統計建模消費者與市場研究品質和工藝工程回覆:從清單中取得字串,其中字串包含定義的文本我就是這樣做的
Names Default To Here( 1 );
x = {"C1234_here_is_some_text", "C1235_here_is_some_other_text", "C1236_you_get_the_idea", ..., "C2000_still_dont_ends_here"};
found = "Not Found";
For( i = 1, i <= N Items( x ), i++,
If( Contains( x[i], "C1999" ) == 1,
found = x[i];
Break()
)
);
show(found);