Skip to content

Instantly share code, notes, and snippets.

@martin-kokos
Last active December 6, 2018 13:50
Show Gist options
  • Save martin-kokos/c8724aff46919bcf9a8843aed38f9a76 to your computer and use it in GitHub Desktop.
Save martin-kokos/c8724aff46919bcf9a8843aed38f9a76 to your computer and use it in GitHub Desktop.
When you are unable to port the RegExp to sed
cat myfile | python3 -c "expr='YOUR_REGEXP'; import sys; import re; [print(match) for match in re.findall(expr, ''.join(sys.stdin.readlines()))]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment