Skip to content

Instantly share code, notes, and snippets.

@maxice8
Created January 7, 2023 21:58
Show Gist options
  • Save maxice8/3db9a481f7f9667b29eed309d6cad60b to your computer and use it in GitHub Desktop.
Save maxice8/3db9a481f7f9667b29eed309d6cad60b to your computer and use it in GitHub Desktop.
Regex to replace all occurrences of add_(adm|dip|mil)_power with grant_all_mana
Search:
^(\s*)add_(adm|dip|mil)_power\s*=\s*([0-9]+).*
\s*add_(adm|dip|mil)_power\s*=\s*[0-9]+.*
\s*add_(adm|dip|mil)_power\s*=\s*[0-9]+.*
Replace:
$1grant_all_mana = {
$1\tmana = $3
$1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment