「繰り返し (フォルダー内の各フォルダー)」におけるエラー処理について

いつも大変お世話になっております。

「繰り返し (フォルダー内の各フォルダー)」を使って、フォルダ内の特定の文字列を含むフォルダを探しているところ、エラーが生じています。

“message”: “繰り返し (フォルダー内の各フォルダー): Invalid pattern ‘フォルダ名’ at offset 45. Too many )'s.”,

これまでスムーズに進められていた処理なのですが。
何かご存知のことありましたらご教授ください。

Hi @kiki1

Check the syntax of folder’s path once. Make sure it is quoted correctly. If your folder name contains special characters, you might need to escape them.

Examine the code around offset 45. This means looking at the characters near the 45th position in your expression.

@kiki1

Please Check the pattern you pass

Use debugging techniques such as logging or breakpointing to inspect the values of variables and patterns at runtime. This can help identify any issues or discrepancies.

pattern contains special characters, such as parentheses, make sure they are properly escaped if needed

こんにちは

この項目は正規表現が適用されるので、かっこなどの正規表現のメタ文字が適切に使用されていないとエラーになります。
入力をすべて文字として扱いたい場合は以下の式をお使いください。

System.Text.RegularExpressions.Regex.Escape(strPattern)

strPatternに検索文字が入っていると仮定しています。

1 Like

開けました!
いつもありがとうございます :relieved:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.