Post Reply 
 
Freshness Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gossamer's Regex Quirkshop
Offline 07-06-2019, 06:20 AM
Reply: #51
RE: Gossamer's Regex Quirkshop
Sorry for the delay! My email notifications got disabled somehow.

(03-08-2019 09:11 AM)nikdun420 Wrote:  
(02-04-2019 07:14 AM)gossamerGadgeteer Wrote:  
(02-04-2019 06:49 AM)nikdun420 Wrote:  Is there a way to replace whole words or phrases by any chance? I have character ideas that would actively benefit from such a thing.
Yes, and in fact it's pretty easy to do! Did you have an example in mind?

In light if steven universe, changing the word God or goddess to diamond.
Siberite: Oh my diamond. why can't you sit still and not insult me before i leave the room at the very least?

This can actually just be done with simple replacements.
Code:
God to Diamond
god to diamond
Goddess to Diamond
goddess to diamond

(04-12-2019 02:21 PM)alexisdarbyshire Wrote:  Hi, I'm not sure if this thread is still active, but I've been having some trouble creating a quirk that alternated the capitalisation of every word, ex: "IM just NOT sure WHAT your ISSUE is MAN"
I've been attempting to regex it out but unfortunately I'm falling short and any help would be appreciated!

Sure, no problem! Set your case to lowercase, and use this.
Code:
([a-z'-]+)([^a-z]+[a-z'-]+)? to ÷$1$2
÷[a-z'-]+ to $U
÷ to
Find all replies by this user
Quote this message in a reply
Offline 07-11-2019, 02:49 AM
Reply: #52
RE: Gossamer's Regex Quirkshop
hello! i seem to be having a bit of trouble with my own ocs quirk...

shes supposed to speak as though her o's are h^o^rned, however there seems to be a problem when it comes to double (oo); those ones are supposed to look like so: h^oo^p but it never ends up working out because of the single one? (im using simple replace so im assuming thats why)

hopefully i didn't sound confusing, but please ask something if i did!

[Image: tumblr_o354ko3AzJ1u6vqiyo1_1280.gif]
Find all replies by this user
Quote this message in a reply
Offline 07-11-2019, 06:54 AM
Reply: #53
RE: Gossamer's Regex Quirkshop
(07-11-2019 02:49 AM)Sir Wrote:  
hello! i seem to be having a bit of trouble with my own ocs quirk...

shes supposed to speak as though her o's are h^o^rned, however there seems to be a problem when it comes to double (oo); those ones are supposed to look like so: h^oo^p but it never ends up working out because of the single one? (im using simple replace so im assuming thats why)

hopefully i didn't sound confusing, but please ask something if i did!

This is a great example of something that's easier to do with regular expressions! Here's the regex replace for your quirk.
Code:
([oO]+) to ^$1^
Find all replies by this user
Quote this message in a reply
Offline 07-12-2019, 12:42 AM (This reply was last modified: 07-12-2019 12:42 AM by Sir.)(Edited by Sir.)
Reply: #54
RE: Gossamer's Regex Quirkshop

ahh thank you so much! it works perfectly!! ^^

[Image: tumblr_o354ko3AzJ1u6vqiyo1_1280.gif]
Find all replies by this user
Quote this message in a reply
Offline 01-08-2020, 09:25 AM
Reply: #55
RE: Gossamer's Regex Quirkshop
it seems to have been a while since this thread has been used, but i have no idea where else to post this request. Using illuminatedWax's pesterchum app, i need to figure out how to make the sEcond lEtter oF eVery wOrd cApitalized, and NoTHING else. I used to have the script, but i had to update my computer. when i went to find the post on mspa forums that had the regex, i found that mspa forums was down...indefinitely. So i would really appreciate a solid regex for this.
It's a one-line thing. What i've got rn is
Code:
Regex: \b(..)
Replace: upper(\1)
Find all replies by this user
Quote this message in a reply
Offline 01-08-2020, 10:59 AM
Reply: #56
RE: Gossamer's Regex Quirkshop
(01-08-2020 09:25 AM)catastrophicallyCapricious Wrote:  it seems to have been a while since this thread has been used, but i have no idea where else to post this request. Using illuminatedWax's pesterchum app, i need to figure out how to make the sEcond lEtter oF eVery wOrd cApitalized, and NoTHING else. I used to have the script, but i had to update my computer. when i went to find the post on mspa forums that had the regex, i found that mspa forums was down...indefinitely. So i would really appreciate a solid regex for this.
It's a one-line thing. What i've got rn is
Code:
Regex: \b(..)
Replace: upper(\1)

Sure, that's doable! Here's the regex for capitalizing only the second letter of a word on Pesterchum.

Code:
Regexp: \b([a-zA-Z])([a-zA-Z])
Replace With: \1upper(\2)

If you want to make sure all other letters are lowercase, you can put this replacement in before it:

Code:
Regexp: ([A-Z])
Replace With: lower(\1)

Hope this helps, and let me know if it doesn't work how you need it to!
Find all replies by this user
Quote this message in a reply
Offline 01-08-2020, 01:58 PM (This reply was last modified: 01-08-2020 02:05 PM by catastrophicallyCapricious.)(Edited by catastrophicallyCapricious.)
Reply: #57
RE: Gossamer's Regex Quirkshop
(01-08-2020 10:59 AM)gossamerGadgeteer Wrote:  
(01-08-2020 09:25 AM)catastrophicallyCapricious Wrote:  it seems to have been a while since this thread has been used, but i have no idea where else to post this request. Using illuminatedWax's pesterchum app, i need to figure out how to make the sEcond lEtter oF eVery wOrd cApitalized, and NoTHING else. I used to have the script, but i had to update my computer. when i went to find the post on mspa forums that had the regex, i found that mspa forums was down...indefinitely. So i would really appreciate a solid regex for this.
It's a one-line thing. What i've got rn is
Code:
Regex: \b(..)
Replace: upper(\1)

Sure, that's doable! Here's the regex for capitalizing only the second letter of a word on Pesterchum.

Code:
Regexp: \b([a-zA-Z])([a-zA-Z])
Replace With: \1upper(\2)

If you want to make sure all other letters are lowercase, you can put this replacement in before it:

Code:
Regexp: ([A-Z])
Replace With: lower(\1)

Hope this helps, and let me know if it doesn't work how you need it to!

little somethinng nnew. as you cann see, i have a tenndenncy to put a seconnd nn. i have it set to do this automatically in Trollian, with the new regex, if nn is at the beginning of the word, it works normally, turning nn into nN...but if nn is the second letter, it stays nn. anny idea why?

Edit: nneverminnd, figured it out. had to change
Code:
Regexp: ([a-zA-Z])([a-zA-Z])
to
Code:
Regexp: ([a-zA-Z1345])([a-zA-Z])
its cuz my other quirks, (substituting [Aa] for 4, [Ii] for 1, [Ss] for 5, and [Ee] for 3) returned a null for a "word character" because of it thinking of numerical characters as integers rather than letters.
Find all replies by this user
Quote this message in a reply
Post Reply 


Board jump:


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