Skip to content

Instantly share code, notes, and snippets.

@pilotmoon
Last active May 24, 2024 09:12
Show Gist options
  • Select an option

  • Save pilotmoon/ab531de2cb01b6fb942511f41ce16967 to your computer and use it in GitHub Desktop.

Select an option

Save pilotmoon/ab531de2cb01b6fb942511f41ce16967 to your computer and use it in GitHub Desktop.
// #popclip transform ip-10-248-153-153.ec2.internal to 10.248.153.153
// name: IPExtract
// language: javascript
// module: true
exports.regex = /(\d{1,3})-(\d{1,3})-(\d{1,3})-(\d{1,3})/;
exports.action = () => popclip.pasteText(popclip.input.regexResult.slice(1).join("."));
@pilotmoon

Copy link
Copy Markdown
Author

(The above block is an extension snippet — select it then click "Install Extension" in PopClip.)

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