Convert adblock rule list to regular expressions
Here's the script convert EasyList and ChinaList to regex lines, which may be used in some web browsers or proxy programs.
#!/bin/sh
ADLIST="http://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt http://easylist.adblockplus.org/easylist.txt"
echo -n > /tmp/adblock.txt
for URL in $ADLIST
do
echo Fetching $URL ...
curl $URL | grep -v ^$ | grep -v \# | grep -v ^[\!\|@] | grep -v \\$ | sed 's/\./\\./g' | sed s/*/.*/g ...
Paste the following code to Script Editor, Save.