can someone make an .api or whatever to write regular expres

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Guest

can someone make an .api or whatever to write regular expres

Post by Guest »

can someone make an .api or whatever to write regular expression in notepad++

http://notepad-plus.sourceforge.net/

You can create your own syntax, and code that hilites.. meaning you can create your own adblock rules, with color coding, and generally easier to view them.

pretty please!
Guest

Post by Guest »

I started on an api already, seems I need a little more though

Code: Select all

!
.*
*
[
]
(
)
/
/
\.
\?
\/
+
.
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

Um... I'd just like to point out that Adblock Plus uses Gecko's JavaScript regular expressions. Though it also has a couple special things in simple filters, like | and *.
Guest

Post by Guest »

yeah! that's why i'm trying for help to make this userdefined laguage so it's easier to write regular expressions for adblock..
Guest

Post by Guest »

Heres the updated (api), feel free to add more..

Code: Select all

!
|
.*
*.
*
[
]
(
)
/
/
\.
\?
\+
=
_
-
\=
\(
[A-Z]
[a-z]
[1-9]
\)
(\
/)
&
\/
[^
\d
\w
\W
\D
!?
{
}
+
.
Guest

Post by Guest »

heres the userDefineLang_adblock.xml

again corrections and additions would be helpful!

Code: Select all

<NotepadPlus>
	<UserLang name="Adblock" ext="txt">
        <Settings>
            <Global caseIgnored="yes"/>
            <TreatAsSymbol comment="yes" commentLine="yes"/>
            <Prefix words1="no"/>
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">"00"00</Keywords>
            <Keywords name="Folder+">/</Keywords>
            <Keywords name="Folder-">/</Keywords>
            <Keywords name="Operators">!? .* * [ ] ( ) / / \. \? \/ + .</Keywords>
            <Keywords name="Comment">!</Keywords>
            <Keywords name="Words1">
|
.*
*.
*
[
]
(
)
/
/
\.
\?
\+
=
_
-
\=
\(
[A-Z]
[a-z]
[1-9]
\)
(\
/)
&
\/
[^
\d
\w
\W
\D
!?
{
}
+
.</Keywords>         
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="0ECBCB" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1"/>
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
            <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
        </Styles>
    </UserLang>
</NotepadPlus>
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

I don't use Notepad++, so I can't be very helpful..
Guest

Post by Guest »

what do you usually use? notepad? :P
Guest

Post by Guest »

there's a very small standalone version, only quiff is it's opensource but no one has ported to another operating system besides windows.. :( besides that it's developers new best friend..

http://sourceforge.net/project/showfile ... _id=102072
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

I use KWrite or nano. I did use Bluefish for a time, but now I, well, don't. I don't use Windows. ;)
Guest

Post by Guest »

I'm using gedit on my linux box, it rules :D
Guest

Post by Guest »

User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

I tried a lot of text editors once about a year ago, and I think gedit was among them. Apparently, I didn't like it.

I can't check it out again at the moment, though.

Edit: As you can see, nano is just for the command line. It's a powerful text editor, though. KWrite barfs on really large files, but nano can handle them with relative ease, and not extremely high memory usage. (63 MB for a 40 MB, 700,000 line text file, and it was very responsive. I'm not willing to test KWrite with it.)
Guest

Post by Guest »

Just downloaded and installed Notepad++ and gave it a run - if you REMOVE some of the custom colors and only have a "couple" plus perhaps underlining, it does make editing easier, and also remembers last file opened and saves it as .css for you without you stipulating it.

Rather nice - a keeper, I believe. Already cleaned up some stuff because of better visibility. Thank you, OP Guest!
Locked