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
Offline 04-13-2020, 09:32 AM
Reply: #58
RE: Gossamer's Regex Quirkshop
Hey! I've been using this guide for at least a year or two and it's been my saving grace, but I've discovered a quirk that's really messing me up. I know this guide hasn't been active in a HOT minute and I can only hope that through some odd miracle you're able to respond haha. It's SO simple and yet it's thwarting me at every turn! I literally made a forum account just to ask this..

Here's the quirk: [oO] = 8~

but the problem comes in with words that use more than one O. Instead of M8~8~n, I would like M88~n. Again, it's probably really simple but I'm a simpleton when it comes to regex. It just flies over my head haha. I really hope you respond!

Thank you!!!
Find all replies by this user
Quote this message in a reply
Offline 04-13-2020, 11:26 AM
Reply: #59
RE: Gossamer's Regex Quirkshop
(04-13-2020 09:32 AM)snerket Wrote:  Hey! I've been using this guide for at least a year or two and it's been my saving grace, but I've discovered a quirk that's really messing me up. I know this guide hasn't been active in a HOT minute and I can only hope that through some odd miracle you're able to respond haha. It's SO simple and yet it's thwarting me at every turn! I literally made a forum account just to ask this..

Here's the quirk: [oO] = 8~

but the problem comes in with words that use more than one O. Instead of M8~8~n, I would like M88~n. Again, it's probably really simple but I'm a simpleton when it comes to regex. It just flies over my head haha. I really hope you respond!

Thank you!!!

Thanks for reaching out, and I'm glad my guide has been helpful! What you're trying to do is totally possible; you just need to split it into two separate replaces. The first one would be:
Code:
([oO]+) to $1~
That will match on any number of O's in a row, and put a ~ at the end of them. The second replace, then, is just:
Code:
[oO] to 8
And that's all you need! Hope this helps!
Find all replies by this user
Quote this message in a reply
Offline 04-27-2020, 02:05 PM
Reply: #60
RE: Gossamer's Regex Quirkshop
(04-13-2020 11:26 AM)gossamerGadgeteer Wrote:  
(04-13-2020 09:32 AM)snerket Wrote:  Hey! I've been using this guide for at least a year or two and it's been my saving grace, but I've discovered a quirk that's really messing me up. I know this guide hasn't been active in a HOT minute and I can only hope that through some odd miracle you're able to respond haha. It's SO simple and yet it's thwarting me at every turn! I literally made a forum account just to ask this..

Here's the quirk: [oO] = 8~

but the problem comes in with words that use more than one O. Instead of M8~8~n, I would like M88~n. Again, it's probably really simple but I'm a simpleton when it comes to regex. It just flies over my head haha. I really hope you respond!

Thank you!!!

Thanks for reaching out, and I'm glad my guide has been helpful! What you're trying to do is totally possible; you just need to split it into two separate replaces. The first one would be:
Code:
([oO]+) to $1~
That will match on any number of O's in a row, and put a ~ at the end of them. The second replace, then, is just:
Code:
[oO] to 8
And that's all you need! Hope this helps!


Thank you SO much!!! I appreciate it so much! Happy nearly three year anniversary btw.. Thank you for taking the time to help me! I'm so stoked about it lol <3 <3 <3 Have a good one :-)
Find all replies by this user
Quote this message in a reply
Post Reply 


Board jump:


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