Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.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_Google Sheets Formula_Array Formulas_Gs Conditional Formatting - Fatal编程技术网

Regex 比较两列,如果

Regex 比较两列,如果,regex,google-sheets,google-sheets-formula,array-formulas,gs-conditional-formatting,Regex,Google Sheets,Google Sheets Formula,Array Formulas,Gs Conditional Formatting,A栏:333我是温斯切特,我是库恩特888,在我的家乡祖尔克凯伦。 B栏:我是温斯切特,我是祖尔克凯伦的克恩特。 我把这两句话分成两列。现在我想比较它们,但不考虑333和888。也不需要创建第三列并替换333,因为如果我以后在B列中进行任何更改,is将立即看到它是否与a列中的不匹配。333实际上是标记,但它们不会显示在此处,因此我将它们替换为333以供参考。您可以这样做: =TRIM(REGEXREPLACE(A1, "[0-9]+", ))=B1 而ArrayFormula将是: =ARR

A栏:
333我是温斯切特,我是库恩特888,在我的家乡祖尔克凯伦。

B栏:
我是温斯切特,我是祖尔克凯伦的克恩特。


我把这两句话分成两列。现在我想比较它们,但不考虑333和888。也不需要创建第三列并替换333,因为如果我以后在B列中进行任何更改,is将立即看到它是否与a列中的不匹配。333实际上是标记,但它们不会显示在此处,因此我将它们替换为333以供参考。

您可以这样做:

=TRIM(REGEXREPLACE(A1, "[0-9]+", ))=B1

而ArrayFormula将是:

=ARRAYFORMULA(TRIM(REGEXREPLACE(A1:A, "[0-9]+", ))=B1:B)

或者,如果两列匹配,则颜色为绿色:

=(TRIM(REGEXREPLACE($A1, "[0-9]+", ))=$B1)*(A1<>"")
=(修剪(REGEXREPLACE($A1,[0-9]+”)=$B1)*(A1“)