Regular expression help

Regular expressions are a powerful way to subset and group files.

Regular expression documentation

Test regular expressions


Few important expressions

"(?<C>)" and "(?<T>)" denote the channel and timepoint groups, respectively.

".*" matches anything

"\d+" matches a sequence of numbers, e.g. 001


Examples

Below examples are on purpose without file extensions. The file extensions can be selected via a drop down in the "Open..." menu item and will be added to the regular expression automatically.

Below examples work both with and without zero-padding, e.g. "T0000", "T0001" works, but also "T0", "T2", "T11" works (and will have the correct numeric-based ordering).

.*--C(?<C>\d+)--T(?<T>\d+) Channel and timepoint encoded in filenames such as "image--C00--T0000" and "image--C01--T0000"
T(?<T>\d+)_(?<C>.*) Channel and timepoint encoded in filenames such as "T0000_gfp" and "T0001_rfp"
t(?<T>\d+)_(?<C>.*) Same as above but with lower case "t" such as "t0000_gfp" and "t0001_rfp"
(?<C>.*)_T(?<T>\d+) Channel and timepoint encoded in filenames such as "gfp_T0000" and "rfp_T0000"
(?<C>.*)/.*T(?<T>\d+) Channels are specified by subfolders and timepoints are encoded in filenames such as "gfp/T0000" and "rfp/T0000"
.*T(?<T>\d+) No channel grouping specified, e.g. "T0000", "T0001", etc. (in this case the name of the containing folder will be used as the channel name).