| View previous topic :: View next topic |
| Author |
Message |
Dark_Alchemist
Trooper

 Joined: Jan 11, 2005 Posts: 17 Location: USA
|
Posted: Sun Dec 23, 2007 10:33 pm Post subject: Need help with this rule. |
|
|
I have it where a board will send me [quote=authorsname]text[/quote] and my simple ruleset will change it to "text"--authorsname
Now it gets really screwy if someone quotes another person like so: [quote=authorsname][quote=previousquotedauthorsname]previous text[/quote]current text[/quote]
My current ruleset: | Code: | Name = "IGN.com VN Non-Insider Quoter 20071223 [Dark_Alchemist]"
Active = TRUE
URL = "(^TYPE(oth))*ign.com(^$TST(keyword=*.site.*))"
Limit = 1800
Match = "\1\[quote=\2\]\3\[/quote\]"
Replace = "\1"\3"--\2\r\r" |
How do I change my ruleset to eliminate the quoted previousauthors section if it exists and if it doesn't do like my current ruleset does? The thing is the quote part could be up to 5 or 6 deep I think (maybe 10 I forget).
|
|
| Back to top |
|
 |
whenever
Lieutenant

 Joined: May 18, 2007 Posts: 164 Location: China
|
Posted: Mon Dec 24, 2007 2:33 am Post subject: |
|
|
A NEST() command should help to eliminate the quoted previous sections and a | should help to suit the "if it exists or not" situations.
Try:
| Code: |
[Patterns]
Name = "IGN.com VN Non-Insider Quoter 20071223 [Dark_Alchemist]"
Active = TRUE
URL = "(^TYPE(oth))*ign.com(^$TST(keyword=*.site.*))"
Limit = 1800
Match = "\1\[quote=\2\]$NEST(\[quote*\],\[/quote\])\3\[/quote\] |"
"\1\[quote=\2\]\3\[/quote\]"
Replace = "\1"\3"--\2\r\r"
|
|
|
| Back to top |
|
 |
Dark_Alchemist
Trooper

 Joined: Jan 11, 2005 Posts: 17 Location: USA
|
Posted: Wed Dec 26, 2007 10:25 am Post subject: |
|
|
That is a new command to me this NEST command.
I just tried it and it is still not working (looks like mine did actually).
Here is the original text: | Code: | [quote=B][quote=A]it really shouldn't be this hard imo.[/quote]
That is exactly what I kept saying between outbursts of profanity for two hours on Friday.[/quote] |
Here is what your code did to it: | Code: | "[quote=A]it really shouldn't be this hard imo."--B
That is exactly what I kept saying between outbursts of profanity for two hours on Friday.[/quote] |
Here is what mine did to it: | Code: | "[quote=A]it really shouldn't be this hard imo."--B
That is exactly what I kept saying between outbursts of profanity for two hours on Friday.[/quote] |
As you can see the results are identical.
|
|
| Back to top |
|
 |
whenever
Lieutenant

 Joined: May 18, 2007 Posts: 164 Location: China
|
Posted: Wed Dec 26, 2007 1:12 pm Post subject: |
|
|
Obviously you didn't import my code correctly. Try to copy my code to clipboard, then go to the web filters editor and right click above your filter and select "import filters from clipboard".
I just modified the code by adding a \s+ to consume the white space after the previous quoted section.
| Code: |
[Patterns]
Name = "IGN.com VN Non-Insider Quoter 20071226 [phoenix]"
Active = TRUE
URL = "(^TYPE(oth))*ign.com(^$TST(keyword=*.site.*))"
Limit = 1800
Match = "\1\[quote=\2\]$NEST(\[quote*\],\[/quote\])\s+\3\[/quote\] |"
"\1\[quote=\2\]\3\[/quote\]"
Replace = "\1"\3"--\2\r\r"
|
in the test window, the result is:
| Code: |
"That is exactly what I kept saying between outbursts of profanity for two hours on Friday."--B
|
|
|
| Back to top |
|
 |
Dark_Alchemist
Trooper

 Joined: Jan 11, 2005 Posts: 17 Location: USA
|
Posted: Thu Dec 27, 2007 3:37 pm Post subject: |
|
|
Must be how I am C&P.
The way, and the only way, I know how to enter a ruleset is to cut it and paste it into my default.cfg using notepad. What is this web filters editor?
|
|
| Back to top |
|
 |
ProxFox
Proxomitron Host

 Joined: Nov 11, 2003 Posts: 940 Location: USA
|
Posted: Thu Dec 27, 2007 6:25 pm Post subject: |
|
|
here, take a look at MizzMona's screenshots page http://mizzmona.com/proxomitron/gui/screenshots/ and click on the Webpage Filter Editor link under the Manage Filters section...
won't be "exactly" the same screenshots as your Proxo (unless, of course, you're using MizzMona's patched GUI, lol)...
that aside, i myself do 90% of my filtering via good ol' notepad, but when "directly" importing from the clipboard, nothing beats the Merge-O-Matic -> Clipboard functionality of the "patched GUI"...
|
|
| Back to top |
|
 |
Grypen
Major

 Joined: Aug 23, 2004 Posts: 913 Location: Japan
|
Posted: Thu Jan 31, 2008 9:15 am Post subject: |
|
|
| Code: |
[Patterns]
Name = "IGN.com VN Non-Insider Quoter 20071226 [phoenix]"
Active = TRUE
URL = "(^TYPE(oth))*ign.com(^$TST(keyword=*.site.*))"
Limit = 1800
Match = "\1\[quote=\2\]$NEST(\[quote*\],\[/quote\])\s+\3\[/quote\] |"
"\1\[quote=\2\]\3\[/quote\]"
Replace = "\1"\3"--\2\r\r"
| I'll add that to the next filterset.
Paul _________________ Get my current Proxomitron filters and Firefox CSS files here or here.
|
|
| Back to top |
|
 |
|
|