すべての Print Command Script トリガファイルは現在プリンタ Zebra に印刷しているとします。
%BTW% /AF="MyFile.btw" /PRN=”Zebra (1)” /P
%END%
既存の Print Command Script トリガファイルを使用するファイル統合を作成したが、印刷ジョブをプリンタ Datamax に転送したいとします。 すべてのトリガファイルを手動で編集してプリンタを更新する代わりに、[検索と置換] 操作を使って "ZebraXXX" パターンを検索し、"Datamax" と置換できます。
パターンが "Zebra" や "Datamax" などの完全一致の場合は、正規表現修正子を使用する必要はありません。 However, if the printing criteria is more complex, a regular expression modifier may be necessary. In this example, the existing Print Command Script trigger files are printing to multiple printers, "Zebra (1)," "Zebra (2)," and "New Zebra." "Zebra (1)" と "Zebra (2)" からの印刷ジョブのみ "Datamax" に転送したいとします。
In this case, regular expression modifiers allow you to execute a more precise search.
To add regular expression modifiers to a Search and Replace action
-
In the Options section of the Search and Replace property page, select Use Regular Expression from the Search Method dropdown list.
-
In the Search for box, type “Zebra”.
-
カーソルを "a" の文字のすぐ後ろに置きます。
-
をクリックして、正規表現修正子のリストから "." を選択します。
-
をもう一度クリックして、正規表現修正子のリストから "*" を選択します。
この結果、[検索文字列] ボックスに "“Zebra.*”
" と入力されます。 これにより、次の二重引用符に達するまで "Zebra" に続く任意の文字を指定できます。
By combining "."
and "*"
into “Zebra.*”
, your search will match double-quote plus Zebra plus any number of trailing characters until the end double-quote is reached. これらのインスタンスがトリガファイルで見つかった場合、"Datamax" と置換されます。