计算多个文本字符串的出现次数
Count occurances of multiple text strings
我想要判断文本字符串中是否存在文本,但是我想要测试多个文本。例如,尝试查找
中是否存在 dog 或 lazy
"The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice"
尝试过
让
字符串 = "The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice,",
计数 = List.Count(Text.Split(字符串,"dog","lazy"))-1
在
计数
来自这篇文章
如果
中存在狗或懒惰
"The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice"
期望是或 1
Text.Split 不带两个参数
见https://docs.microsoft.com/en-us/powerquery-m/text-split
试试看
Count = List.Count(Text.Split(String,"dog")) + List.Count(Text.Split(String,"lazy"))-2
我想要判断文本字符串中是否存在文本,但是我想要测试多个文本。例如,尝试查找
中是否存在 dog 或 lazy"The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice"
尝试过 让 字符串 = "The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice,", 计数 = List.Count(Text.Split(字符串,"dog","lazy"))-1 在 计数
来自这篇文章
如果
中存在狗或懒惰"The quick brown fox jumps over the lazy dog and the lazy dog doesn't notice"
期望是或 1
Text.Split 不带两个参数
见https://docs.microsoft.com/en-us/powerquery-m/text-split
试试看
Count = List.Count(Text.Split(String,"dog")) + List.Count(Text.Split(String,"lazy"))-2