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
smartturkeycj@gmail.com
Beginner


Joined: 24 Dec 2010
Posts: 16

PostPosted: Sun Sep 11, 2011 8:49 am   

Using wildcards with %replace?
 
Hey guys, making sure I'm not crazy.

I'm trying to use a wildcard in the %replace() function, but it isnt' seeming to work. I've tried the following:

Code:
%replace($item.$loop.name,"a "*" doll of Luciano","")
%replace($item.$loop.name,"a "(%*)" doll of Luciano","")
%replace($item.$loop.name,"a "[A-Z][a-z]+" doll of Luciano","")


None of those seemed to work, so am I just out of luck and going to have to have a $replace() for each of the various states of the doll?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Sep 11, 2011 12:40 pm   
 
You'll want to use %subregex instead.

Code:
%subregex($item.$loop.name, "a \w+ doll of Luciano")


This is, of course, if I understood your intentions correctly and you're wanting to remove the entire line. If there's something else you're trying to do, give us an example of what it's SUPPOSED to do.
Reply with quote
smartturkeycj@gmail.com
Beginner


Joined: 24 Dec 2010
Posts: 16

PostPosted: Sun Sep 11, 2011 12:48 pm   
 
I want it so that I just get Luciano out of it. However, I just discovered %numword(), and %word(), so I was able to do it cleaner!
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