正则表达式 |文件路径 .json 删除
Regular Expression | file path .json removal
我们要从路径名中删除 .json 文件。
输入:
CGS.6codebase\ingestion\postingestion\fdgr.json
输出应该如下所示:
CGS.6codebase\ingestion\postingestion
有人可以帮忙吗?在 find/replace 部分下使用 excel?还是正则表达式?
您可以使用下面的公式
=LEFT(A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",100)),100)))-1)
我们要从路径名中删除 .json 文件。
输入:
CGS.6codebase\ingestion\postingestion\fdgr.json
输出应该如下所示:
CGS.6codebase\ingestion\postingestion
有人可以帮忙吗?在 find/replace 部分下使用 excel?还是正则表达式?
您可以使用下面的公式
=LEFT(A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",100)),100)))-1)