Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
haiku
Wanderer


Joined: 19 Nov 2004
Posts: 70

PostPosted: Mon Aug 13, 2007 8:41 pm   

How do you escape characters?
 
Here's a pattern that bothers me to no end:

^** You improve at being annoying. **$

Because of the * being a wildcard, I can't anchor this correctly. How would you anchor this so that I don't send Save to the mud when someone chats a silly comment?
Reply with quote
forren
Novice


Joined: 26 Apr 2007
Posts: 44

PostPosted: Mon Aug 13, 2007 8:43 pm   Re: How do you escape characters?
 
haiku wrote:
Here's a pattern that bothers me to no end:

^** You improve at being annoying. **$

Because of the * being a wildcard, I can't anchor this correctly. How would you anchor this so that I don't send Save to the mud when someone chats a silly comment?



~ has worked for me, though I'm not at home to check. ^~*~* You improve at being annoying. ~*~*$
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Aug 13, 2007 8:51 pm   
 
If there are no other wildcards being used in the pattern, try using the Verbatim option instead of the quote character. Not sure if the anchor characters work in that mode, though, but plain text is always faster than wildcards.
_________________
EDIT: I didn't like my old signature
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Aug 13, 2007 9:13 pm   
 
The anchor characters (^$) do work in Verbatim mode, but nothing else does, so it'd be perfect in this instance.

Forren is right about ~ being used to escape things. There's a list of all the special characters in patterns here.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Aug 13, 2007 10:01 pm   
 
Aww, Fang I like the Dr Who one better. Crying or Very sad
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Mon Aug 13, 2007 10:06 pm   
 
I must agree with Arminas on this! Shocked



Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Aug 13, 2007 10:50 pm   
 
Please guys, stay somewhat on topic here. Use PM's to talk to him about his signature and avatar.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net