Skip to content

Instantly share code, notes, and snippets.

@youtux
Last active September 21, 2020 13:37
Show Gist options
  • Select an option

  • Save youtux/0c2fb35e661aa2986055e300271856fe to your computer and use it in GitHub Desktop.

Select an option

Save youtux/0c2fb35e661aa2986055e300271856fe to your computer and use it in GitHub Desktop.
Regular expressions to find code usage

Regular expressions I find useful when looking for code usages

Find python function definitions that use certain arguments

(?s)def\s+[^(]*?\([^)]*?\b(argument1|argument2)\b[^)]*?\)\s*:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment