Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
regex replace multi-line + in multiple files
find . -name "$FILES" | xargs perl -0777 -pi -e '$REGEX'
# flag: -0777 tells perl to read the file as a whole
# replace '-pi' with '-pi.bak' to create backups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment