Skip to content

Instantly share code, notes, and snippets.

@random-robbie
Created October 8, 2019 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save random-robbie/d356f7775d17efb57d03de0836c7f3d5 to your computer and use it in GitHub Desktop.
Save random-robbie/d356f7775d17efb57d03de0836c7f3d5 to your computer and use it in GitHub Desktop.
Text Wrangler Regex's

^[^.]+. - This Removes everything before the . and including the . so handy for a list of sub doamins.

@random-robbie
Copy link
Author

[,].*

Remove everything after ,

@random-robbie
Copy link
Author

random-robbie commented Nov 14, 2019

sed -i 's/^/http:\/\//g' file.txt
sed -i 's|^|https://|g' file.txt

@random-robbie
Copy link
Author

remove https prefix

sed  -i 's/https\?:\/\///' file.txt

@random-robbie
Copy link
Author

^[/]

removes the first /

@random-robbie
Copy link
Author

random-robbie commented Feb 21, 2021

only lines over set length

cat file | awk 'length($0) > 120'

@random-robbie
Copy link
Author

cut -d ':' -f 2

cut a combo list user:pass this will just give the pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment