+ $name = $1;
+ $regex = $3 ? $3 : '\S+';
+ push @$match_re, $regex;
+ push @$match_name, $name;
+ } else {
+ $name = $comp;
+ push @$match_re, $name;
+ push @$match_name, undef;
+ }
+
+ if ($regex) {
+ $path_lookup->{regex} = {} if !defined($path_lookup->{regex});
+
+ my $old_name = $path_lookup->{regex}->{match_name};
+ die "$errprefix found changed regex match name\n"
+ if defined($old_name) && ($old_name ne $name);
+ my $old_re = $path_lookup->{regex}->{match_re};
+ die "$errprefix found changed regex\n"
+ if defined($old_re) && ($old_re ne $regex);
+ $path_lookup->{regex}->{match_name} = $name;
+ $path_lookup->{regex}->{match_re} = $regex;
+
+ die "$errprefix path match error - regex and fixed items\n"
+ if defined($path_lookup->{folders});
+
+ $path_lookup = $path_lookup->{regex};
+