Post Reply 
 
Freshness Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kama's RegEx Tutorial and Store
Offline 06-16-2019, 09:38 AM (This reply was last modified: 09-30-2019 01:59 AM by kamafr.)(Edited by kamafr.)
Reply: #1
Information Kama's RegEx Tutorial and Store
Hello everyone!

Today, I would like to walk in the footsteps of giants, and offer a sort of non official sequel to Gossamer's Regex Quirkshop. It has been a whole 3 years since they've posted/edited this holy book of RegEx use for MxRP. So as a tribute to their work, I propose an unofficial companion post.


So What IS RegEx? The word stands for "Regular Expressions" and it's an IT term. It's used in coding for algorithms that are used to search strings of characters for very specific elements. In the case of MxRP, we use RegEx to find these specific elements in the raw text we type in when we roleplay, and replace them with something else to create a quirk.


Disclaimer: I am not a professional, and do not claim to be. Moreover, I don't claim that the way I code in these quirks is the only way. Please be aware that it is possible to find better ways to make these, but I only wish to offer a tutorial for newcomers to RegEx. Thank you for understanding. If you notice that I got something wrong, I will be glad to edit and rectify my mistakes. Please inform me respectfully of any mistakes.

The following is the list of what you can expect in this thread:
  1. Level 1 - Of Cases, Colors and Copies.
  2. Level 2 - To Alternate, Hide and Replace.
  3. Level 3 - For a capital beginning and ending.
  4. Regex Cheatsheet.
  5. Some help with your quirk.
Without further ado, let's get started!

1 - Of CCases, CColors and CCopies

2 - To AlTeRnAtE, hIdE aNd RePlAcE

3 - FoR A CapitaL BeginninG AnD EndinG.

4 - RegEx Cheatsheet

In the spirit of Gossamer's original post, I will be glad to answer any questions and help you create your quirk with RegEx. As they say, let MxRP do the work, you can simply type away as you do and your quirk will be executed on its own.
Please enjoy, and have a lot of fun!

Geek extraordinaire, Game designer and illustrator.
Find all replies by this user
Edit this reply Quote this message in a reply
Offline 07-06-2019, 06:31 AM (This reply was last modified: 07-06-2019 06:32 AM by gossamerGadgeteer.)(Edited by gossamerGadgeteer.)
Reply: #2
RE: Kama's RegEx Tutorial and Store
Thanks for the shout-out! You've got great explanations for your regex, and it's nice to see other people getting into this stuff! :)

As something to think about for future quirks, what happens to your OC's quirk (the capitalizing at both ends one) if they use a word with an apostrophe or a hyphen in it?
Find all replies by this user
Quote this message in a reply
Offline 07-07-2019, 09:18 AM
Reply: #3
RE: Kama's RegEx Tutorial and Store
(07-06-2019 06:31 AM)gossamerGadgeteer Wrote:  Thanks for the shout-out! You've got great explanations for your regex, and it's nice to see other people getting into this stuff! :)

As something to think about for future quirks, what happens to your OC's quirk (the capitalizing at both ends one) if they use a word with an apostrophe or a hyphen in it?

Hello there! It's a pleasure to play around with Regex and talk with people who enjoy these little things too. Thanks for passing by.

As for your question, from experience it ends up capitalising the first letter of a word with an apostrophe will be capitalized, but funnily enough it's the letter before the apostrophe that counts as "before the word boundary" so it's the one that gets capitalized. (As an example, "that's would become "ThaT's) unless it's at the end of a sentence or of the string, then it's the very last letter which gets capitalized.
For hyphens, it could be interesting to make a special case because right now, they are treated as two different words. For words like "In-BetweeW" and compound names like "AnnE-MariE" it's not very shocking though.

I find that it's the edge cases like these that demand a lot of thought and work arounds, and they make it a more fun experience. Good luck thinking of all exceptions and edge cases to a relatively complex rule you want to implement though!

Geek extraordinaire, Game designer and illustrator.
Find all replies by this user
Quote this message in a reply
Post Reply 


Board jump:


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