After much googling, I’ve given up and come here to ask for direct assistance. Here’s what I need to do: a search on a certain directory (and all child directories and files) for the following pattern:
- An example in English: find all strings of text assigned to a PHP variable
- An example from the project:
$pageTitle = "Some normal text here";
Since the variable name and the text assigned to it can be anything, I think I want something like this:
“Find all instances of a dollar sign, a single equals sign, single-or-double quotes, and a semi-colon all on a single line”
I think that’ll be specific enough to show me all of the instances I need to find. Is that possible via regex?
Something like the following should work:
Explanation:
If you add what language or tool you are using you might get a more specific answer on how to use the regex and pull out what you need.