Last active
March 12, 2021 20:39
-
-
Save davecurrierseo/fdd1c8409f97abf3d9081556f78297fe to your computer and use it in GitHub Desktop.
Regular Expressions For Cleaning Up URL Lists - Mostly Find/Replace for text editors
This file contains 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
Find: (.*?)(?<!\.php)\n | |
Replace: | |
Remove everything that doesn't contain .php | |
^((?!\.png|\.jpg).)*$ | |
select everything that doesn't contain .png or .jpg |
This file contains 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
Find: (.*?)([^/]+(?=/$|$)) | |
Replace: $2 |
This file contains 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
Find: ([^?]+).* | |
Replace: $1 |
This file contains 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
Find: ^(?:.(?<!pattern))*$ | |
Replace: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment