我正在尝试通过批号传递脱字符字符。逃脱他们一次会很容易,但我需要做两次。 我有一个基于Regex表达式(不是我的代码)备份表的可执行文件。 我想用排除列表备份所有表格。 使用^(?!tableName$).*
适用于单个表格。通过管道|和caret^chars through batch CALL
批处理文件1(来自命令行调用)
SET ignoreTables=tableName
:: Call the backup script
CALL SecondBatch.bat %ignoreTables%
批处理文件2
:: Passthrough ignoreTables
Executable.exe --ignoreTablesPattern="^(?!%1$).*"
但是我想忽略多个表。在正则表达式中,这意味着使用| (管)字符例如; tableOne|tableTwo
需要;
SET ignoreTables=tableOne^|tableTwo
哪个是正确的SET
,但不是在传递给CALL
正确的输出是通过命令行的工作原理是,
Executable.exe --ignoreTablesPattern="^(?!tableOne|tableTwo$).*"
如何从批处理文件中获得此结果?
注意:如果我可以使用^表来匹配以“table”开头的所有表格,但我也有同样的问题试图逃脱^ ^脱离第一批! – Josh