diff --git a/htroot/Help.html b/htroot/Help.html index 2875acc61..56a6b982c 100644 --- a/htroot/Help.html +++ b/htroot/Help.html @@ -66,7 +66,44 @@ s --> Search Page
n --> News
w --> Network
t --> Status
- +
+
+
+YaCy uses Regular Expressions for some functions, for example in the blacklist.
+
+There are some standards for these regexps, YaCy uses the syntax used by Perl 5.
+Here ist a short overview about the functions, which should fir for most cases:
+
+
+ + + + + + + + + + + + + + + + +
.: arbitrary character
x: character x
^x: not x
x*: 0 or more times x
x?: 0 or 1 time x
x+: 1 or more times x
xy: concatenation of x and y
x|y: x or y
[abc]: a or b or c (same as a|b|c)
[a-c]: a or b or c (same as above)
x{n}: exactly n appearances of x
x{n,}: at least n appearances of x
x{n,m}: at least n, maximum m appearanches of x
( ): Modify priority of instructions
\: Escape-Character, used to escape special characters (for example "[" or "*"), so that they loose their special meaning
+
+
+Regex follow a special priority (descending): concatenation, unary operators (*,+,^,{}), binary operators (|). This can be overridden with brackets.
+
+Example:
+
+.*heise.de/.*/[0-9]+
+
+This matches heise.de/ with a string in front of it, for example "http://www.", followed by any string, then a slash and a number. The dot in "heise.de" is not escaped with "\", because it represents any character, thus the "." itself, too.
+A possible URL which would match this regexp is: http://www.heise.de/newsticker/meldung/59421
+An URL which would not match is: http://www.heise.de/tp/r4/artikel/20/20701/1.html
+There is ".html" at the end, which is not included with the Regular Expression. #[footer]# diff --git a/locales/de.lng b/locales/de.lng index f2f49eb8d..95195e5c2 100644 --- a/locales/de.lng +++ b/locales/de.lng @@ -43,7 +43,7 @@ Delete URL pattern==URL aus der Liste l Enter new domain name / path pattern in the form:==Geben Sie eine neue Domain/einen neuen Pfad in dieser Form ein: "<domain>/<path-regexpr>":=="<Domain>/<Pfad>" Add URL pattern==Füge URL hinzu -Import blacklist items from other YaCy peers:==Importiere Blacklists von anderen YaCy Peers: +Import blacklist items from other YaCy peers:==Importiere Blacklist von anderen YaCy Peers: Host:==Host: "Load new blacklist items"==Lade neue Blacklist Import blacklist items from URL:==Importiere Blacklist von URL: @@ -157,6 +157,30 @@ Search Page==Suchseite Network==Netzwerk Status==Status +YaCy uses Regular Expressions for some functions, for example in the blacklist.==YaCy benutzt reguläre Ausdrücke für einige Funktionen, z.B. die Blacklist. +There are some standards for these regexps, YaCy uses the syntax used by Perl 5.==Es gibt einige Standards für diese Ausdrücke, YaCy orientiert sich an der Syntax von Perl 5. +Here ist a short overview about the functions, which should fir for most cases\:<==Hier finden Sie einen kurzen Überblick über die Funktionen, der die meisten Anwenungsfälle abdecken sollte:< +arbitrary character==beliebiges Zeichen +character x==Zeichen x +not x==nicht x +0 or more times x==0 oder mehr Vorkommen von x +0 or 1 time x==0 oder 1 Vorkommen von x +1 or more times x==1 oder mehr Vorkommen von x +concatenation of x and y==Verkettung von x und y +x or y==x oder y +a or b or c (same as a\|b\|c)==a oder b oder c (dasselbe wie a|b|c) +a or b or c (same as above)==a oder b oder c (dasselbe wie oben) +exactly n appearances of x==genau n Vorkommen von x +at least n appearances of x==mindestens n Vorkommen von x +at least n, maximum m appearanches of x==mindestens n, maximal m Vorkommen von m +Modify priority of instructions==Priorität der Befehle ändern +Escape-Character, used to escape special characters \(for example "\[" or "\*"\), so that they loose their special meaning==Escape-Zeichen, das benutzt wird, um Zeichen mit Sonderbedeutung (z.B. "[" oder "*"), zu "escapen", d.h. ihre Sonderbedeutung verlieren. +Regex follow a special priority \(descending\)\: concatenation, unary operators \(\*,\+,\^,\{\}\), binary operators \(\|\). This can be overridden with brackets.==Regex folgen Prioritäten (absteigend): Verkettung, unäre Operatore (*,+,^,{}), binäre Operatoren (|). Die Reihenfolge kann durch setzen von Klammern geändert werden. +Example:==Beispiel: +This matches heise.de/ with a string in front of it, for example "http://www.", followed by any string, then a slash and a number. The dot in "heise.de" is not escaped with "\\", because it represents any character, thus the "." itself, too.==Dies erfüllt heise.de/ mit einem String davor, z.B. "http://www.". Es folgt ein beliebiger String, dann ein Slash und eine Zahl. Der Punkt in "heise.de" ist nicht escaped, weil der Punkt für ein beliebiges Zeichen steht, folglich auch für "." selbst. +A possible URL which would match this regexp is\:==Eine URL, die den regulären Ausdruck erfüllen würde, ist: +An URL which would not match is:==Eine URL die diese Regex nicht erfüllen würde ist: +There is ".html" at the end, which is not included with the Regular Expression.==Hier ist ".html" am Ende angehängt, das nicht in der Regex enthalten ist. #----------------------------------------------------------- #File: index.html @@ -519,7 +543,7 @@ reversed order==in umgekehrter Reihenfolge YaCy: Remote Peer Profile==YaCy: Remote Peer Profil Remote Peer Profile:==Remote Peer Profil: -Wrong access of this page==Kein Zugriff auf diese Seite +Wrong access of this page==Falscher Zugriff auf diese Seite The requested peer is not known or a potential peer, what means the peer's profile can't be fetched, because he is behind a firewall.==Der gewünschte Peer ist nicht bekannt oder ein potenzieller Peer, das bedeutet, das Profil kann nicht geladen werden, da der Peer hinter einer Firewall ist. The peer==Der Peer is not online.==ist nicht online. diff --git a/source/de/anomic/tools/bbCode.java b/source/de/anomic/tools/bbCode.java index 0eb9aaa36..14b4521d8 100644 --- a/source/de/anomic/tools/bbCode.java +++ b/source/de/anomic/tools/bbCode.java @@ -73,15 +73,23 @@ public class bbCode { return output; } - /**Parses parts of bbCode (will be extended). + /**Parses parts of bbCode (to-do: [Img],[URL],[List],[List=]). *@author Alexander Schier + *@author Roland Ramthun *@return String */ public String bb(String input){ String output = escapeHtml(input); - + //Parse bold output = output.replaceAll("\\[b\\]", ""); output = output.replaceAll("\\[/b\\]", ""); + //Parse italic + output = output.replaceAll("\\[i\\]", ""); + output = output.replaceAll("\\[/i\\]", ""); + //Parse underlined + output = output.replaceAll("\\[u\\]", ""); + output = output.replaceAll("\\[/u\\]", ""); + return output; } }