find_files_by_content_with_regex

Retrieves an array of file paths from the codebase that match a given regex pattern in their content.

Arguments

NameTypeDescriptionRequired

path_to_directory

string

The directory to search in.

find_content_pattern

string

The regex pattern used to find content in files.

cached_file_paths

array

A cached array of file paths to speed up the search.

limit

number

Limit the amount of results returned.

exclude_duplicates

boolean

Exclude duplicates from the results.

Returns

TypeDescription

array

An array of file paths that contain content matching the regex pattern.

Example

- name: find_files_by_content_with_regex
  arguments:
    path_to_directory: <directory-to-search-in>
    find_content_pattern: <regex-pattern-to-find-content>
    cached_file_paths: <optional-cached-array-of-file-paths>
    exclude_duplicates: <optional-boolean-to-exclude-duplicates>
  returns: <array-of-file-paths>

Last updated