Skip to content

Instantly share code, notes, and snippets.

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