从列表中获取字符串,其中字符串包含定义的文本你好,
有人能帮助我吗?我创建了一个看起来像这样的列表:
{“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);