7.2. cpforager.misc.grep_pattern
- cpforager.misc.grep_pattern(strings, pattern)
Extract list of strings that contain the pattern.
- Parameters:
strings (list[str]) – list of strings.
pattern (str) – pattern to be found in strings.
- Returns:
the list of strings that contain the pattern.
- Return type:
list[str]
Function useful to sort file names based on a pattern.