|
cfb Newbie
Joined: 26 Mar 2011 Posts: 9
|
Posted: Mon Jun 06, 2011 5:51 pm
Pattern Matching with %match |
Hey all!
I've been trying to use the %match function to detect the follow "(*) corpse (sprawled on the floor)" from a string list but I have run into some trouble. the * wildcard doesn't appear to work (at least in how I've been using it) and while I can get it to detect the word corpse, I can't seem to make it detect anything inside the (). I've tried assigning the pattern to a variable and then placing the variable into the %match function but no luck!
Any ideas on what sort of syntax to use here?
Thanks again for all the help! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jun 06, 2011 8:08 pm |
The () are special pattern-matching symbols, so the above syntax is trying to look for the phrase "abc123@#$ corpse sprawled on the floor". While there may or may not be a better alternative to *, you should only need to quote the parentheses.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|