display | more...

example regular expression expained: (from addwriteup (htmlcode)

if( $$VARS{HideNewWriteups} || ($curTitle=~/^(?:dream|editor|root) Log: /i) ) {
} elsif($curTitle =~

/^(?:January|February|March|April|May|June|July|August|September|October|November|December) [1-9]\d?, \d+/i

) {
} else {

There are two regular expressions used here, one for dream/editor/root logs, and one for day logs (shown on its own line, because it is so long).
The pipe | is used for alternates. For example, /foo|bar|fubar/ will match "foo", "bar", or "fubar".
Parenthesis () are used to group, which are needed here because the pipe will go from the beginning to end of the regular expression. /(foo|bar)fubar/ matches "fubar" immediately preceded by either "foo" or "bar". Without the parenthesis, /foo|barfubar would match either "foo" or "barfubar".
However, non-capturing parenthesis are used instead of normal parenthesis. (Huh?) Parenthesis also capture whatever was matched inside of them, which can be accessed later using the Perl variables $1, $2, et cetera. For the /(foo|bar)fubar/ example, if it was run against the string "rabbarfubar", the entire regular expression would match on the "barfubar" part, and $1 would be "bar".
If extended regular expressions are enabled, (? ... ) allows one to do all sorts of crazy stuff. In this case, (?: ... ) simply groups things as normal, but does not capture the result (store the part that matched), which means Perl has to do a tiny bit less work.
Due to the way regular expressions work, it is usually better to search for multiple string constants using pipes in a single regular expression than have a separate RE for each string constant.
\d matches a single digit, 0 to 9. This does the same thing as [0-9].
A star, or asterisk, * matches 0 or more times (and is not used above). A plus, + matches 1 or more times. A question mark, ? matches 0 or 1 times.
When looking for the daylog, above, the section [1-9]\d? in intended to match the day of the month: the first digit is 1 up to 9, and the optional second digit may be any digit. This actually matches a few more cases than we really want, like 42, but in this case it doesn't really matter, because a writeup about December 42, 2004 is probably cannon fodder, anyway. Likewise, the year can be 1 or more digits, and a leading 0 isn't something to be worried about.
Finally, the i at the end of the regular expression, / ... /i means ignore case. This way, it still matches if some bozo hasn't grasped the purpose of the shift key.

Your browser: CCBot/2.0 (https://commoncrawl.org/faq/)

Strike test:
<span style="text-decoration:line-through"></span>

enter text to ROT-13:

If you aren't [N-Wing|me]: Be warned! (This is a place I can test code and other crazy things without messing things up for everybody.)

All your base are belong to us!