Post Reply 
 
Freshness Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rufioh's quirk
Offline 12-03-2014, 04:19 PM
Reply: #1
Rufioh's quirk
I'm not sure what it is, but Rufioh's quirk consists of his censored curses, but they won't work in the chats unless the random symbols and numbers around them are removed. Just wondering if that can be fixed c:
Find all replies by this user
Edit this reply Quote this message in a reply
Offline 12-04-2014, 01:44 AM (This reply was last modified: 12-04-2014 06:22 AM by epithetic.)(Edited by epithetic.)
Reply: #2
RE: Rufioh's quirk
They work as intended.

The "random numbers and symbols" are regular expressions preventing matches from occurring where they shouldn't.

For example:
Code:
/(^|\s)ass(\W|$)/ --> $1*ss$2
matches "ass" only if occurring at the beginning of a line (^) or (|) after a spacing character (\s), and only when followed by a non word character (\W) or the end of the line ($). The replacement puts back in the spacing character/beginning of line ($1) and the ensuing nonword character or end of line ($2).

leads to:

i don't want to be an ass about it,

while at the same time preventing this from being censored

i don't want to assign blame to anyone about it,
Find all replies by this user
Quote this message in a reply
Offline 12-04-2014, 06:13 AM
Reply: #3
RE: Rufioh's quirk
That is some nifty coding skills

[Image: tumblr_lzk6d0DB5f1r5hl2i.gif]
x1(list)
Find all replies by this user
Quote this message in a reply
Offline 12-04-2014, 02:23 PM (This reply was last modified: 12-04-2014 02:24 PM by musicalCow.)(Edited by musicalCow.)
Reply: #4
RE: Rufioh's quirk
That makes much more sense now, thanks for explaining it c:
I haven't exactly gotten much experience with the coding so I was unsure of how to work with it
Find all replies by this user
Quote this message in a reply
Offline 12-04-2014, 04:09 PM
Reply: #5
RE: Rufioh's quirk
Here is a basic introduction to regex if you're curious, and you can play around with it in a live sandbox here. It's not that difficult once you get the hang of it and crazy versatile/useful.

Regex on msparp follows normal js syntax; you can use regex instead of simple replacements by enclosing the pattern in /forward slashes/ (the same as here on the forums).
Find all replies by this user
Quote this message in a reply
Offline 12-05-2014, 03:31 PM
Reply: #6
RE: Rufioh's quirk
Coding.... Too complicated Wweh
Find all replies by this user
Quote this message in a reply
Post Reply 


Board jump:


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