Akron | 61948ef | 2022-03-30 14:07:57 +0200 | [diff] [blame] | 1 | define URLChar [Char|[Sym - ["<"|">"|%"]]]; |
| 2 | |
| 3 | define Dot "."|[["["|"("] "d" "o" "t" [")"|"]"]] .o. Caseinsensitive; |
| 4 | define At "@"|[["["|"("] "a" "t" [")"|"]"]] .o. Caseinsensitive; |
| 5 | |
| 6 | define TldEnd [{org}|{de}|{com}] .o. Caseinsensitive; |
| 7 | |
| 8 | ! Very relaxed URL scheme, not based on the strict Lucene implementation |
| 9 | define URL [ [ [{http} (s) | {ftp} | {file}] ":" "/" "/"] | [{www} Dot] ] |
| 10 | URLChar [URLChar|SP]* URLChar |
| 11 | .o. Caseinsensitive; |
| 12 | |
| 13 | define Domain Char+ [Dash Char+]* Dot TldEnd; |
| 14 | |
| 15 | ! Email addresses |
| 16 | define Email URLChar+ At URLChar+ [Dot URLChar+]+; |
| 17 | |
| 18 | ! Twitter user, hashtag, Google+ |
| 19 | define SNS ["@"|"#"|"+"] Char+; |
| 20 | |
| 21 | define FileEnd [ |
| 22 | [{htm} ("l")]| |
| 23 | [{doc} ("x")]| |
| 24 | {pdf}| |
| 25 | ["j" "p" ("e") "g"]| |
| 26 | ["m" "p" ["3"|"4"]]| |
| 27 | {ogg}| |
| 28 | {png}| |
| 29 | [{ppt} ("x")]| |
| 30 | {avi}| |
| 31 | {txt}| |
| 32 | {xls}| |
| 33 | {xml}| |
| 34 | {aac}| |
| 35 | {gif}| |
| 36 | {exe} |
| 37 | ] .o. Caseinsensitive; |
| 38 | |
| 39 | define File (( AsciiLetter ":" %\ | "/" ) [ Char | "_" | "-" | Char [ %\ | "/" ] ]*) [Char | "-" | "_" ]+ "." FileEnd; |