User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions
Content added Content deleted
(→All variables: NULL? Dunno. Special:AbuseLog/66610) |
No edit summary |
||
Line 1: | Line 1: | ||
The rules are formatted much as conditionals in a C/Java/Perl-like language. |
The rules are formatted much as conditionals in a C/Java/Perl-like language. |
||
=== Literals === |
|||
You can specify a literal by placing it in single or double quotes (for strings), or by typing it in as-is (for numbers, both floating-point and integer). You can get linebreaks with <code>\n</code>, tab characters with <code>\t</code>, and you can also escape the quote character with a backslash. |
|||
'''Examples''' |
|||
<syntaxhighlight lang="c"> |
|||
"This is a string" |
|||
'This is also a string' |
|||
'This string shouldn\'t fail' |
|||
"This string\nHas a linebreak" |
|||
1234 |
|||
1.234 |
|||
-123 |
|||
</syntaxhighlight> |
|||
=== Comments === |
=== Comments === |