Merge branch 'master' of github.com:kiooeht/pesterchum
This commit is contained in:
commit
308024a93b
2 changed files with 197 additions and 17 deletions
36
README.mkdn
36
README.mkdn
|
@ -550,16 +550,18 @@ as well.
|
|||
can combine them, too: [a-z0-9] will match any digit and lowercase letter.
|
||||
|
||||
There are also different shortcuts for character types:
|
||||
* \d matches any digit; same as [0-9]
|
||||
* \D matches any non-digit; same as [^0-9]
|
||||
* \s matches any spaces
|
||||
* \S matches any non-space
|
||||
* \w matches any alphanumeric character; same as [a-zA-Z0-9_]
|
||||
* \W matches any non-alphanumeric character; same as [^a-zA-Z0-9_]
|
||||
<pre>
|
||||
\d matches any digit; same as [0-9]
|
||||
\D matches any non-digit; same as [^0-9]
|
||||
\s matches any spaces
|
||||
\S matches any non-space
|
||||
\w matches any alphanumeric character; same as [a-zA-Z0-9_]
|
||||
\W matches any non-alphanumeric character; same as [^a-zA-Z0-9_]
|
||||
</pre>
|
||||
|
||||
You can include this inside brackets, too.
|
||||
|
||||
There's also a special character, \b. What \b does is make sure that
|
||||
There's also a special character, \\b. What \\b does is make sure that
|
||||
you are at the beginning or end of a word.
|
||||
* So with that knowledge, let's try Kanaya:
|
||||
<pre>
|
||||
|
@ -570,12 +572,12 @@ as well.
|
|||
</pre>
|
||||
|
||||
Another feature of regular expressions is the ability to match
|
||||
*repeated* characters. There are three repeat characters: the "*", the
|
||||
*repeated* characters. There are three repeat characters: the "\*", the
|
||||
"+", "?", and "{m,n}". They work by playing them after the character,
|
||||
or character type you want to match. (So, you could say "\s+" or ".*")
|
||||
|
||||
The "*" character matches ZERO or more of that character. So, for
|
||||
example, "f*" would match "f" and "ff" -- and any other character!
|
||||
The "\*" character matches ZERO or more of that character. So, for
|
||||
example, "f\*" would match "f" and "ff" -- and any other character!
|
||||
That's right, every character counts as matching it zero times. Yeah,
|
||||
it's weird. I suggest you use...
|
||||
|
||||
|
@ -650,14 +652,14 @@ either "bro" or "dog":
|
|||
Regexp: "\s" Replace with: " ribbit ", " ", " ", " ", " ", " ", etc....
|
||||
</pre>
|
||||
|
||||
where " " is just a blank space added a bunch of times. (You can see
|
||||
how many blank spaces you've added by clicking on the list.) You have
|
||||
to add the spaces because each entry has the same chance of being
|
||||
selected. (Yes, I know this could be improved.) If you add " ribbit "
|
||||
and 9 spaces, " ribbit " will have a 1/10 chance of being picked.
|
||||
where " " is just a blank space added a bunch of times. (You can see
|
||||
how many blank spaces you've added by clicking on the list.) You have
|
||||
to add the spaces because each entry has the same chance of being
|
||||
selected. (Yes, I know this could be improved.) If you add " ribbit "
|
||||
and 9 spaces, " ribbit " will have a 1/10 chance of being picked.
|
||||
|
||||
Also note that if you add more than one prefix or more than one
|
||||
suffix, it will pick randomly from them instead of adding them both!
|
||||
Also note that if you add more than one prefix or more than one
|
||||
suffix, it will pick randomly from them instead of adding them both!
|
||||
|
||||
* <b>Mispeller</b>:
|
||||
Be careful with thsi one. The mispeller will randomly mispell x% of
|
||||
|
|
178
trollquirks.mkdn
Normal file
178
trollquirks.mkdn
Normal file
|
@ -0,0 +1,178 @@
|
|||
Troll Quirks
|
||||
============
|
||||
|
||||
Karkat
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "(.)"
|
||||
REPLACED WITH: "upper(\1)"
|
||||
</pre>
|
||||
|
||||
Aradia
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "[oO]"
|
||||
REPLACE WITH: "0"
|
||||
</pre>
|
||||
|
||||
#####After Prototyping
|
||||
<pre>
|
||||
RANDOM REGEXP: "\s"
|
||||
REPLACED WITH: " ribbit ", " ", " ", " ", " ", " ", etc....
|
||||
</pre>
|
||||
|
||||
Tavros
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "\b(\w)(\w*)"
|
||||
REPLACED WITH: "lower(\1)upper(\2)"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "\.?"
|
||||
WITH: ","
|
||||
</pre>
|
||||
|
||||
Sollux
|
||||
------
|
||||
#####Pre-blind
|
||||
<pre>
|
||||
REGEXP: "[iI]"
|
||||
REPLACE WITH: "\1\1"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[sS]"
|
||||
REPLACE WITH: "2"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "\btoo?\b"
|
||||
REPLACE WITH: "two"
|
||||
</pre>
|
||||
|
||||
#####Blind
|
||||
<pre>
|
||||
REGEXP: "[oO]"
|
||||
REPLACE WITH: "0"
|
||||
</pre>
|
||||
|
||||
Nepeta
|
||||
------
|
||||
<pre>
|
||||
PREFIX: ":33 < "
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[eE][eE]"
|
||||
REPLACE WITH: "33"
|
||||
</pre>
|
||||
|
||||
Kanaya
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "\b(\w)"
|
||||
REPLACE WITH: "upper(\1)
|
||||
</pre>
|
||||
|
||||
Terezi
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "[aA]"
|
||||
REPLACE WITH: "4"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[iI]"
|
||||
REPLACE WITH: "1"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[eE]"
|
||||
REPLACE WITH: "3"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "(.)"
|
||||
REPLACE WITH: "upper(\1)"
|
||||
</pre>
|
||||
|
||||
Vriska
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "[bB]"
|
||||
REPLACE WITH: "8"
|
||||
</pre>
|
||||
<pre>
|
||||
RANDOM REGEXP: "([aeiouAEIOU])"
|
||||
REPLACE WITH: "\1\1\1\1\1\1\1\1", "\1", "\1", "\1", "\1", "\1", etc........
|
||||
</pre>
|
||||
<pre>
|
||||
RANDOM REGEXP: "([\.\?,!]$)"
|
||||
REPLACE WITH: "\1\1\1\1\1\1\1\1", "\1", "\1", "\1", "\1", "\1", etc........
|
||||
</pre>
|
||||
<pre>
|
||||
REPLACE: ":"
|
||||
WITH: "::::"
|
||||
</pre>
|
||||
|
||||
Keep in mind that the RANDOM REGEXP ones require the extra "\\1"s to be added in order to not happen all the time. If you want those quirks to happen less often, add more "\\1".
|
||||
|
||||
Equius
|
||||
------
|
||||
<pre>
|
||||
PREFIX: "D --> "
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[lL][oO][oO]"
|
||||
REPLACE WITH: "100"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[xX]"
|
||||
REPLACE WITH: "%"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "(\b[sS][tT][rR][oO][nN][gG]\w*)"
|
||||
REPLACE WITH: "upper(\1)"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "[oO][oO]"
|
||||
REPLACE WITH: "00"
|
||||
</pre>
|
||||
|
||||
Gamzee
|
||||
------
|
||||
#####Version 1: "HoNk HoNk"
|
||||
<pre>
|
||||
REGEXP: "([a-zA-Z])([a-zA-Z])"
|
||||
REPLACED WITH: "upper(\1)\2"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "([a-z])([a-z])\b"
|
||||
REPLACED WITH: "\1upper(\2)"
|
||||
</pre>
|
||||
|
||||
#####Version 2: "HoNk hOnK"
|
||||
<pre>
|
||||
REGEXP: "(.)(.)"
|
||||
REPLACED WITH: "upper(\1)\2"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "([a-z])(.)\b"
|
||||
REPLACE WITH: "\1upper(\2)"
|
||||
</pre>
|
||||
|
||||
Eridan
|
||||
------
|
||||
<pre>
|
||||
REGEXP: "([vVwW])"
|
||||
REPLACE WITH: "\1\1"
|
||||
</pre>
|
||||
<pre>
|
||||
REGEXP: "ing\b"
|
||||
REPLACE WITH: "in"
|
||||
</pre>
|
||||
|
||||
Feferi
|
||||
------
|
||||
<pre>
|
||||
REGEXP: [hH]
|
||||
REPLACE WITH: ")("
|
||||
</pre>
|
||||
<pre>
|
||||
REPLACE: "E"
|
||||
WITH: "-E"
|
||||
</pre>
|
Loading…
Reference in a new issue