[ITK] RegularExpressionSeriesFileNames

Bill Lorensen bill.lorensen at gmail.com
Thu Mar 9 10:28:32 EST 2017


[^ab1-9]$
should be
^ [^ab1-9]$


On Wed, Mar 8, 2017 at 3:57 PM, Fijoy Vadakkumpadan <tofijoy at gmail.com> wrote:
> I'm using my own code. The RE is hard coded in my code as a string literal,
> like:
>
> nameGenerator->SetRegularExpression(regex),
>
> where regex is a const char* pointing to string literal.
>
> --Fijoy
>
> On Wed, Mar 8, 2017 at 3:26 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Are you using the example code or your own code? Are you passing the RE on
>> the command line or is it hard coded in the code?
>>
>> On Mar 8, 2017 2:57 PM, "Fijoy Vadakkumpadan" <tofijoy at gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I'd like to use the RegularExpressionSeriesFileNames  class to generate a
>>> list of sorted file names in a directory, but having some difficulties. In a
>>> toy example that I'm experimenting with, my directory has the following
>>> files:
>>>
>>> 3   a   a1  ab1 b   b1  c   c1  cd
>>>
>>> Here are 2 regular expressions that I tried and the file names they
>>> match:
>>>
>>> (1) expression [^ab1-9] matches c1, c, and cd
>>>
>>> (2) expression [^ab1-9]$ matches c and cd
>>>
>>> According to documentation, (1) makes sense to me, but (2) does not.
>>> Specifically, (2) should not have cd as a match, since $ matches end-of-line
>>> (and not d). Am I missing something?
>>>
>>> Documentation I'm looking at:
>>> https://itk.org/Doxygen/html/Examples_2IO_2ImageSeriesReadWrite2_8cxx-example.html#_a3
>>>
>>> Is there additional documentation for the class that will help?
>>>
>>> Thanks,
>>> --Fijoy
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>>
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Community mailing list