Commit b397f318 authored by Cory Quammen's avatar Cory Quammen
Browse files

exodus: less aggressive prefix matching

The previous regular expression was too agressive in matching the
prefix (.* matches everything). Change it so that we match up to the
first period then match a generic extension.
parent 864d18d1
......@@ -242,8 +242,9 @@ void vtkExodusFileSeriesReader::FindRestartedResults()
// numbering).
//
// The `e` in the above pattern can be any of exodus supported extensions e.g.
// exo, ex2, etc. Hence we keep the regex generic (ref: paraview/paraview#19056).
vtksys::RegularExpression regEx("^(.*\\.[a-zA-Z0-9]+)(-s.[0-9]+)?(\\.[0-9]+\\.[0-9]+)?$");
// exo, ex2, etc. Hence we keep the regex generic (ref: paraview/paraview#19056,
// paraview/paraview#19202).
vtksys::RegularExpression regEx("^([^\\.]*\\.[a-zA-Z0-9]+)(-s.[0-9]+)?(\\.[0-9]+\\.[0-9]+)?$");
if (!regEx.find(baseName))
{
// Filename does not follow convention. Just use it.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment