Post Reply 
 
Freshness Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gossamer's Regex Quirkshop
Offline 11-07-2016, 11:56 AM (This reply was last modified: 12-10-2016 03:52 PM by gossamerGadgeteer.)(Edited by gossamerGadgeteer.)
Reply: #1
Brick Gossamer's Regex Quirkshop
Hello world, today I'm here to talk about Regex! In the time I've spent roleplaying, I've come across several people stuck typing out complicated quirks by hand, and in many of these cases, there's a way to fit it into Regex instead! Of course, there will always be cases where no amount of replaces will do the trick, but I'm here to share a few creative uses I've made for people, and also to take requests if you're looking for a way to automate your own quirk!

Tutorial Quirk #1: Seeing red. (Beginner Level)

Tutorial Quirk #2: "rAndOmly" capItalizEd vowels (Intermediate Level)

Tutorial Quirk #3: tAlKiNg wITh tEnTs (Advanced Level)

If you have a quirk, for an OC or otherwise, let me know and I can help you get MSPARP to do all the hard work! No one should have to type out their quirk by hand. Sleepy Hope this helps!

~ gossamerGadgeteer

Below are quirks I've done for people on this thread by request!
Find all replies by this user
Edit this reply Quote this message in a reply
Online 11-07-2016, 12:08 PM
Reply: #2
RE: Gossamer's Regex Quirkshop
Gooood damn, while I don't have any personal use for these, I have no choice but to applaud you for this. Thanks so much for sharing. You have a thumbs up from me.

Find all replies by this user
Quote this message in a reply
Offline 11-07-2016, 12:34 PM
Reply: #3
RE: Gossamer's Regex Quirkshop
(11-07-2016 12:08 PM)Alienoid Wrote:  Gooood damn, while I don't have any personal use for these, I have no choice but to applaud you for this. Thanks so much for sharing. You have a thumbs up from me.

Aww thanks! I do this kinda stuff for a living, so I figured it could be my way to give back to the community. Not many people talk about Regex here!
Find all replies by this user
Quote this message in a reply
Offline 11-07-2016, 05:06 PM
Reply: #4
RE: Gossamer's Regex Quirkshop
I must say, you're really good at this. Also, is the purpleblood OC was F☆'s Louces?

Richard VS
The Russians

[Image: tumblr_o4erv15Uj31sc73eno1_1280.gif]
Thanks starlitEnchantress for the talksprite
Find all replies by this user
Quote this message in a reply
Offline 11-07-2016, 05:13 PM
Reply: #5
RE: Gossamer's Regex Quirkshop
Could I ask for my OC's quirk to be regex'd? The idea is simple: capitalizing the last word in a sentence.

My fan adventures:

Troll Jailbreak

Trolls but no SGRUB

A kid in some strange world
Find all replies by this user
Quote this message in a reply
Offline 11-07-2016, 05:51 PM (This reply was last modified: 11-07-2016 05:56 PM by freeMiliu_2K01.)(Edited by freeMiliu_2K01.)
Reply: #6
RE: Gossamer's Regex Quirkshop
Wow, thanks! I was losing some quirk ideas. I guess the one I'm most proud of is Cernun's whole all letters must be even quirk. [color=#008141](ex: "I absolutely despise you" = "Ii absolutely despisee youu") But other than that the others are pretty general. Thanks for the inspiration! :D

(11-07-2016 05:06 PM)pacifistRunner Wrote:  I must say, you're really good at this. Also, is the purpleblood OC was F☆'s Louces?

No, sorry :D

Louces's quirk has him capitalizing all of his name's letters, LOUCES MINURO, and use 4 as A and 18 as B coz that's his birthday. It's basically to signify his ego.

Example:
"Fuck you, you're stupid, you bastard!"
to
"fUCk yOU!! yOURE StUpID- yOU 184StARd!!"

muLTIfanDOM TRaSh
OC count: 91 (and counting)

[Image: oTCvtnR.png]
MY AU (Under Rewrites)

I RP with OC's only :)
Find all replies by this user
Quote this message in a reply
Offline 11-07-2016, 06:35 PM (This reply was last modified: 11-07-2016 06:43 PM by gossamerGadgeteer.)(Edited by gossamerGadgeteer.)
Reply: #7
RE: Gossamer's Regex Quirkshop
(11-07-2016 05:06 PM)pacifistRunner Wrote:  I must say, you're really good at this. Also, is the purpleblood OC was F☆'s Louces?

Thanks!

(11-07-2016 05:13 PM)Fubar Wrote:  Could I ask for my OC's quirk to be regex'd? The idea is simple: capitalizing the last word in a sentence.

I sure can! Big Grin This should work even if you don't use punctuation at the end of a line.
Code:
\b[\w']+?($|[\.\?!]) to $U

And if you don't want it to count the end of a line as the end of a sentence, you can use this instead!
Code:
\b[\w']+?[\.\?!] to $U

(11-07-2016 05:51 PM)freeMiliu_2K01 Wrote:  Wow, thanks! I was losing some quirk ideas. I guess the one I'm most proud of is Cernun's whole all letters must be even quirk. (ex: "I absolutely despise you" = "Ii absolutely despisee youu") But other than that the others are pretty general. Thanks for the inspiration! :D

I'm glad I inspired you! Did you need regex for the making words an even number of letters quirk? Because I could totally do that one.
Find all replies by this user
Quote this message in a reply
Offline 11-08-2016, 03:16 AM (This reply was last modified: 11-08-2016 03:27 AM by AncientE%cursion.)(Edited by AncientE%cursion.)
Reply: #8
RE: Gossamer's Regex Quirkshop
For one of my OC's quirks, they replace every 'a' with '[A]' and every 'b' with a '[8]'. Thing is, the a replacement can replace the 'A' inside the brackets which I'm wondering if there's any regex solution to this.

Here's [A]n ex[A]mple of the thing I'm t[A]lking [A][8]out.

Also, do you mind explaining what the hell is up with Cronus' regex setup?

[Image: 9bb7pc.gif]

Do the evolution
Find all replies by this user
Quote this message in a reply
Offline 11-08-2016, 12:07 PM (This reply was last modified: 11-08-2016 06:41 PM by gossamerGadgeteer.)(Edited by gossamerGadgeteer.)
Reply: #9
RE: Gossamer's Regex Quirkshop
(11-08-2016 03:16 AM)AncientE%cursion Wrote:  For one of my OC's quirks, they replace every 'a' with '[A]' and every 'b' with a '[8]'. Thing is, the a replacement can replace the 'A' inside the brackets which I'm wondering if there's any regex solution to this.

Here's [A]n ex[A]mple of the thing I'm t[A]lking [A][8]out.

Also, do you mind explaining what the hell is up with Cronus' regex setup?

Hmm, I'm a bit confused. Why can't you just use a simple replace of a to [A] and b to [8]? If you're also worried about capital letters, then just make sure to put your capital A replace before your lowercase a replace:
Code:
Simple Replacements:
A to [A]
a to [A]
b to [8]
B to [8]
MSPARP does replaces in order, so if you do your lowercase replace before your capital replace, it'll double up your brackets.

And sure! Here's what Cronus' setup is doing:
1. Remove any apostrophes that are between two letters.
2. If there's a v at the start of a word or line, replace it with φ.
3. If there's a V at the start of a word or line, replace it with Á.
4. If there's a v following a word boundary, or a w before a word boundary, replace it with α. (Note: In a word starting with vv, the first one is replaced, making it φv, and then the second v is now replaced here, since φ creates a word boundary - it's not a normal letter or underscore. Also note: a . creates a word boundary.)
5. Replace any remaining w's or v's with φ. (Same symbol as step 2.)
6. Replace α with wv.
7. Replace φ with vw.
8. If there's a V following a word boundary, or a W at the end of a word, replace it with Ά. (Basically the same as step 4, but with capital letters.)
9. Replace any remaining W's or V's with Á. (Same as step 5 but with capital letters.)
10. Replace Ά with WV.
11. Replace Á with VW.
12. Replace B with 8.
13. If there's a vw in a word (not at the front), followed by an s, n, k, l, or t, replace it with wv instead.
14. If there's a VW in a word (not at the front), followed by an S, N, K, L, or T, replace it with WV instead. (Same as 13 but with capital letters.)
15. Remove any periods that are between two letters. (Remember back in step 4? You can put a . before/after a v or w to MANUALLY swap the vw/wv order. Then this step clears out the period.)
16 & 17. Fixes the following four smileys. :D ;D D: D; (*shrug*)

That's a lot of stuff, and most of it has to do with all the special characters. So, why the weird characters? Because if we tried just adding in v's and w's, we'd end up with duplicates. Say we started with a v. Step 1, put a w after a v: vw. Step 2, put a v after a w: vwv. That's too many! So instead, we use special characters as markers. A w should be a wv, so we give it one marker. A v should be a vw, so we give it a different marker. Cronus' quirk isn't quite that simple, but that's the idea.

Now, let's break it down into what it's actually all doing:
1. Remove any apostrophes inside words.
2. Replace B with 8.
3.1. Replace all v's and w's with vw, EXCEPT:
- If the v is the second v in a row at the start of a word. (This part is probably unintentional, and also unlikely to ever come up.)
- If the v has a non-word character before it. (Like a period.)
- If the w is at the end of the word, or has a non-word character after it. (Again, like a period.)
- If the v or w comes directly before s, n, k, l, or t.
3.2. In any of these cases, replace it with a wv instead.
4. Remove any periods inside words.
5. If :d, ;d, d:, or d; shows up, capitalize the d. (The quirk uses lower case, so this is needed to make smileys work.)

Hope this clears things up for you!
Find all replies by this user
Quote this message in a reply
Offline 11-14-2016, 08:51 PM
Reply: #10
RE: Gossamer's Regex Quirkshop
Alright, I've got something expanding on that idea. Basically, when I type out a message and the words have 'a's and 'b's in a series like 'about' or 'babadook', the brackets make it awfully spacious. Do you reckon there's a way to make every series of those letters 'a' and 'b' be collected in one set of brackets?

So instead of this: [A][B]out; [8][A][8][A]dook, it's [A8]out; [8A8A]dook.

[Image: 9bb7pc.gif]

Do the evolution
Find all replies by this user
Quote this message in a reply
Post Reply 


Board jump:


User(s) browsing this memo: 1 Guest(s)