Skip to content

Instantly share code, notes, and snippets.

@maxice8
Created January 6, 2023 07:52
Show Gist options
  • Save maxice8/1fd70a13a2922b324515a24fd2c1a6ff to your computer and use it in GitHub Desktop.
Save maxice8/1fd70a13a2922b324515a24fd2c1a6ff to your computer and use it in GitHub Desktop.
Regex to replace all occurrences of change_(adm|dip|mil) with add_monarch_points_or_power
# Search:
^(\s*)change_(adm|dip|mil)\s*=\s*([0-9-]*)
# Replace:
$1change_monarch_points_or_power = {
$1\tpoints = $3
$1\tpower = $2
$1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment