text: Q:
  
  Confusion with ANT pattern syntax and possible variations
  
  I am working on an ANT pattern parser as part of a large server project.
  There are some good examples of ANT patterns in the answer to this post: How do I use Nant/Ant naming patterns? however, I am still confused about some possible permutations.
  One of the examples on the ANT pattern documentation here http://nant.sourceforge.net/release/0.85/help/types/fileset.html is as follows:
  
  **/test/**   Matches all files that have a test element in their path, including test as a filename.
  
  My understanding is that ** matches one or more directories and also files under those directories. So I would expect **/test/** to match src/test/subfolder/file.txt and test/file2.txt but this statement seems to imply that it would also match a file named src/test. Is this correct even though there is a / after the test in the pattern?
  Also, its not clear whether the following patterns would be valid:
  folder**
  folder1/folder**
  **folder/file.txt
  
  I would imagine that they would work the same as 
  folder*/**
  folder1/folder*/**
  **/*folder/file.txt
  
  but are they allowed?
  
  A:
  
  I did some testing with NAnt as per coolcfan's suggestion and answered my own question. The patterns in the question are all valid. 
  Based on the following files from the link in my question above:
  
  bar.txt
  src/bar.c
  src/baz.c
  src/test/bartest.c
  
  The following unexpected patterns are also valid:
  
  src**                      matches 2, 3 and 4
  **.c                        matches 2, 3, and 4
  **ar.*                    matches 1 and 2
  **/bartest.c/**  matches 4
  src/ba?.c/**        matches 2 and 3
  
  For completeness, these are in addition to the following patterns taken from the link in my question above:
  
  *.c             matches nothing (there are no .c files in the current directory)
  src/*.c     matches 2 and 3
  */*.c         matches 2 and 3 (because * only matches one level)
  **/*.c       matches 2, 3, and 4 (because ** matches any number of levels)
  bar.*         matches 1
  **/bar.*   matches 1 and 2
  **/bar*.* matches 1, 2, and 4
  src/ba?.c matches 2 and 3
     
  
  