Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 使用单列在两列中进行索引/匹配_Regex_Google Sheets_Filter_Google Sheets Formula_Textjoin - Fatal编程技术网

Regex 使用单列在两列中进行索引/匹配

Regex 使用单列在两列中进行索引/匹配,regex,google-sheets,filter,google-sheets-formula,textjoin,Regex,Google Sheets,Filter,Google Sheets Formula,Textjoin,我想使用一列在两列中进行查找。下面的例子 | a | | c | a | foo | | c | a | foo | | b | | e | c | bar | | b | a | baz | | c | | b | a | baz | | d | |a | c | a | foo | c | a | foo| |b | e | c | bar | b | a | baz| |c | b | a | baz| |d| 第一个表是我用来匹配的数据 第二个表是我要索引到的数据表

我想使用一列在两列中进行查找。下面的例子

| a | | c | a | foo | | c | a | foo | | b | | e | c | bar | | b | a | baz | | c | | b | a | baz | | d | |a | c | a | foo | c | a | foo| |b | e | c | bar | b | a | baz| |c | b | a | baz| |d| 第一个表是我用来匹配的数据

第二个表是我要索引到的数据表

第三个表是我想要的结果。

试试:

=FILTER(C:E, 
 REGEXMATCH(C:C&"", "^"&TEXTJOIN("$|^", 1, A:A)&"$"), 
 REGEXMATCH(D:D&"", "^"&TEXTJOIN("$|^", 1, A:A)&"$"))


注意,它区分大小写

您在哪里遇到麻烦?请把你试过的配方贴出来。你想要什么还不清楚。你是如何从一列四个条目变成三列两个条目的?请分享一个示例表来说明这个问题。您共享的表格数据不足以回答这个问题。@DarrenBartrup Cook有两个输入表(1x4,3x3)和一个输出表(3x2)。