Pattern matching guide

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Fisheye supports a powerful type of regular expression for matching files and directories (same as the pattern matching in Apache Ant).

These expressions use the following wild cards:

?

Matches one character (any character except path separators)

*

Matches zero or more characters (not including path separators)

**

Matches zero or more path segments.

Ant globs では、単なるファイル名ではなく、パスの照合が行われることに留意してください。

  • パターンの先頭がパスの区切り文字 (つまり / や \) でない場合、そのパターンは /**/ で始まると見なされます。
  • パターンの末尾が / である場合、** が自動的に追加されます。
  • A pattern can contain any number of wild cards.

Also see the Ant documentation.

*.txt

/foo.txt/bar/foo.txt とは一致しますが、
/foo.txty/bar/foo.txty/ とは一致しません。

/*.txt

/foo.txt とは一致しますが、
/bar/foo.txt とは一致しません。

dir1/file.txt

/dir1/file.txt/dir3/dir1/file.txt/dir3/dir2/dir1/file.txt と一致します。

**/dir1/file.txt

上記と同じです。

/**/dir1/file.txt

上記と同じです。

/dir3/**/dir1/file.txt

/dir3/dir1/file.txt/dir3/dir2/dir1/file.txt とは一致しますが、
/dir3/file.txt,/dir1/file.txt とは一致しません。

/dir1/**

/dir1/ 配下のすべてのファイルと一致します。

/dir1*Matches all files as /dir11, /dir12, /dir12345 and so on.
/dir??Matches all files as /dir11, /dir22 and so on, replacing just 2 characters.
最終更新日: 2018 年 10 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.