+check_files() {
+ # Desc: Applies $file_regex to files specified by path
+ # Input: var: file_regex
+ # array: files_stdin
+ # Output: array: files_stdin
+ local file;
+ declare -a filtered_files_stdin;
+
+ for file in "${files_stdin[@]}"; do
+ if [[ "$file" =~ $file_regex ]]; then
+ filtered_files_stdin+=("$file");
+ fi;
+ done;
+ files_stdin=("${filtered_files_stdin[@]}");
+}; # apply $firegex to files_stdin array