|
smartturkeycj@gmail.com Beginner
Joined: 24 Dec 2010 Posts: 16
|
Posted: 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? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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. |
|
|
|
smartturkeycj@gmail.com Beginner
Joined: 24 Dec 2010 Posts: 16
|
Posted: 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!
|
|
|
|
|
|
|
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
|
|