Last active
November 14, 2017 09:31
-
-
Save verajosemanuel/531454e27be49d4cb3b70e27433f4579 to your computer and use it in GitHub Desktop.
#perl inserts a newline between negative + positive #regex pattern in #bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -pe 's/NOTNEEDED\.\s*WORD(*SKIP)(*F)|WORD\./\n$&/g' | |
# SAMPLE | |
NOTNEEDED. WORD. 8 de 2007/04/12 excepción definitiva | |
1ª Concesión de derechos en Londres WORD. 3901 de 2019/10/01 UTC | |
# OUTPUT | |
NOTNEEDED. WORD. 8 de 2007/04/12 excepción definitiva | |
1ª Concesión de derechos en Londres | |
WORD. 3901 de 2019/10/01 UTC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment